Answers for "write df to parquet pandas"

1

save pandas dataframe to parquet

df.to_parquet('df.parquet.gzip', compression='gzip')
Posted by: Guest on November-25-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