brite_etl.core.io¶
IO, input/output.
Functions¶
export_excel(): Export frames/frameset as an .xlsx docimport_report(): Import a downloaded BriteCore report with proper formating.
-
export_excel(frames, path, file_name='brite_etl_export.xlsx')[source]¶ Export frames/frameset as an .xlsx doc
Each frame (1 if passed a frame, multiple if passed a frameset) will put placed on it’s own sheet, titled using the frames display name. :param frames: Frame/Frameset to export :param path: path to place exported file in :param file_name: name of file (MUST include ‘xlsx’!), defaults to ‘brite_etl_export.xlsx’ :type file_name: str, optional
-
import_report(file_path, name, sheet, skip_rows=0)[source]¶ Import a downloaded BriteCore report with proper formating.
This lets you import a BriteCore .xls report as a dataframe without having to open it up, save policyId as text, etc. Please note that you MUST have Excel installed on your machine, because this opens the file up in Excel to read it.
Parameters: - file_path (str) – Path to directory containing file
- name (str) – Name of the file. Don’t have to include dates, it will find the filename containing it.
- sheet (str, int) – Name (or index) of the sheet to grab
- skip_rows (int) – Number of rows to skip from beginning of sheet
Returns: The selected sheet as a dataframe with proper formatting
Return type: Pandas.DataFrame