, - - :
import pandas as pd
df = pd.DataFrame(data={'col1': [1, 2], 'col2': [3, 4]})
(, , : $ conda install fastparquet)
import fastparquet
convert data frame to parquet and save to current directory
df.to_parquet('df.parquet.gzip', compression='gzip')
read the parquet file in the current directory, back to the pandas data frame
pd.read_parquet('df.parquet.gzip')
output:
col1 col2
0 1 3
1 2 4
source
share