Answers for "pandas to parquet"

1

save pandas dataframe to parquet

df.to_parquet('df.parquet.gzip', compression='gzip')
Posted by: Guest on November-25-2020
0

parquet to dataframe

pd.read_parquet('example_pa.parquet', engine='pyarrow')
Posted by: Guest on August-24-2020
0

pandas dataframe to parquet s3

import awswrangler as wr
wr.pandas.to_parquet(
    dataframe=df,
    path="s3://my-bucket/key/my-file.parquet"
)
Posted by: Guest on June-21-2020
0

how to store in parquet format using pandas

>>> df = pd.DataFrame(data={'col1': [1, 2], 'col2': [3, 4]})
>>> df.to_parquet('df.parquet.gzip', compression='gzip')  
>>> pd.read_parquet('df.parquet.gzip')  
   col1  col2
0     1     3
1     2     4
Posted by: Guest on July-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language