Skip to content

parquet

Module to interact with parquet files.

This module contains functions to read and write parquet files.

Typical usage example:

```python
with open(
    "FILE_NAME.parquet",
    "rb",
) as f:
    df = read_parquet(
        f
    )

with open(
    "FILE_NAME.parquet",
    "wb",
) as f:
    write_parquet(
        df, f
    )
```

write_parquet

write_parquet(data_frame, file, index=False)

Writes data frame to parquet file.

Parameters:

  • data_frame (DataFrame) –

    Data frame that should be written to file.

  • file (BytesIO) –

    Binary file stream.

  • index (Optional[bool], default: False ) –

    Whether index is included in parquet file. See pandas documentation.

read_parquet

read_parquet(file)

Reads parquet from file and returns data frame.

Parameters:

  • file (BytesIO) –

    Binary file stream.

Returns:

  • DataFrame

    Data frame read from parquet file.