get_df_io

get_df_io(df, sep='\\t', index=False, **kwargs)[source]

Get the dataframe as bytes.

Parameters:
  • df (pandas.DataFrame) – A dataframe

  • sep (str) – The separator in the dataframe. Overrides Pandas default to use a tab.

  • index (bool) – Should the index be output? Overrides the Pandas default to be false.

  • kwargs – Additional kwargs to pass to pandas.DataFrame.to_csv().

Return type:

BytesIO

Returns:

A bytes object that can be used as a file.