Skip to content

I/O

DataFrame can be easily exported and imported.

Export

Use to_file() to export the DataFrame. The output format is automatically detected from the output extension. More explicit methods (to_file_excel(), to_file_tsv(), ...) are available.

>>> df.to_file('output.xlsx')

Import

Any DataFrame outputed by to_file() can be easily imported, regardless of the DataFrame dimensions, index and columns:

>>> import metaframe as mf
>>> df = mf.DataFrame.from_file('output.xlsx')

Excel format

Extensive

The default Excel output output 3 sheets: the DataFrame, the MetaFrameRow and the MetaFrameCol

Alt Text

It enables to filter both MetaFrames with direct effect on the DataFrame:

  • Reorder the MetaFrameRow Alt Text

  • Filter the MetaFrameCol Alt Text

Not extensive

With extensive=False, only the DataFrame will be exported, without the MetaFrames. You will still be able to filter the MetaFrameRow, but not the MetaFrameCol. Additionaly, you will also have access to the matrix filters:

Alt Text

Summaries

With write_summaries=True, basic, whole, per-rows and per-columns default summaries are generated:

Alt Text

Per-group summaries can be added with the grp* parameters (see Reference).