astro.files.types.excel
Module Contents
Classes
Concrete implementation to handle Excel file type |
- class astro.files.types.excel.ExcelFileType(path, normalize_config=None, load_options=None)
Bases:
astro.files.types.base.FileType
Concrete implementation to handle Excel file type
- Parameters:
path (str) –
normalize_config (dict | None) –
load_options (astro.options.LoadOptions | None) –
- LOAD_OPTIONS_CLASS_NAME = ('PandasLoadOptions',)
- export_to_dataframe(stream, columns_names_capitalization='original', **kwargs)
read Excel file from one of the supported locations and return dataframe
- Parameters:
stream – file stream object
columns_names_capitalization – determines whether to convert all columns to lowercase/uppercase in the resulting dataframe
- Return type:
pandas.DataFrame
- create_from_dataframe(df, stream)
Write Excel file to one of the supported locations
- Parameters:
df (pandas.DataFrame) – pandas dataframe
stream (io.TextIOWrapper) – file stream object
- Return type:
None