Python & Pandas: Pendant for R/dplyr .rds format -
what's closest pendant / alternative .rds
format known r python
respectively pandas dataframe
?
i tried to_pickle()
listed in dataframe
documentation lacks property smaller corresponding .csv
file holding same contents.
df = pd.get_dummies(pd.series(list('abca'))) df.to_csv("tmp.csv") # 44 bytes df.to_pickle("tmp.pickle") # 682 bytes
i'm looking fast (save time writing , reading in comparision .csv
) , compressed (save disk space in comparision .csv
) way (de)serialize pandas dataframe
s.
thanks.
pandas can export hdf5
, faster , more compact csv. has problems mixed types, problems exist csv well.
you have careful comparing filesizes small datasets. overhead compression might make file larger smaller datasets
Comments
Post a Comment