safetyduck
safetyduck

Reputation: 6874

serialize pandas (python) dataframe to binary format

This post includes my question but is actually about another question: Pandas DataFrame serialization

Is there serialization routine like numpy.savez for pandas dataframes? I see I can use hdf5 but I was hoping to avoid this since hdf5 is an extra install and I haven't been able to get h5py up and running on all the platforms I need.

Upvotes: 4

Views: 2687

Answers (2)

meteore
meteore

Reputation: 4775

Can you instead get PyTables (installation) working on all platforms relevant to you?

In that case you can use directly the HDFStore class in Pandas to serialize Panels and DataFrames, potentially with compression, to HDF5.

Upvotes: 1

safetyduck
safetyduck

Reputation: 6874

Arg, DataMatrix is the same as DataFrame. There is a 'load' and a 'save' function that seems to work ... I guess the best way to search the docs is using the interactive prompt with ipython.

Upvotes: 3

Related Questions