dsp_pandas.io module

dsp_pandas.io module#

Helper to read and write data from and to different formats.

dsp_pandas.io.read_all_excel_sheets(fname: str | Path, index_col: int = 0, drop_empty: bool = True) SimpleNamespace[source]#

Import all sheets as pandas DataFrames from an Excel table into a SimpleNamespace object.

Parameters:
  • fname (str | Path) – Path to the Excel file.

  • index_col (int, optional) – Index columns to use, by default 0

  • drop_empty (bool, optional) – Wheater to drop the entirely missing columns although they might be named, by default True

Returns:

Object with all the sheet names as attributes. White space are replaced by underscores.

Return type:

SimpleNamespace