qis.save_df_to_csv

qis.save_df_to_csv(df, file_name=None, folder_name=None, key=None, add_current_date=False, local_path=None, file_type=FileTypes.CSV)[source]

write one DataFrame to a CSV under the managed path layout.

The path is assembled rather than passed: local_path/folder_name/file_name_key.csv. That keeps a dataset’s location in one place, so a caller names the dataset instead of building a path.

Parameters:
  • df (DataFrame) – frame to write. A Series is promoted to a one-column frame

  • file_name (str) – base file name without extension

  • folder_name (str) – subdirectory under local_path

  • key (str) – suffix appended to file_name, for one file per key

  • add_current_date (bool) – append a minute-resolution timestamp (YYYYMMDD_HHMM) to the file name. Repeated writes to the same path within a minute overwrite the existing file. Use a distinct file_name or key for each export when all versions must be retained

  • local_path (str | None) – directory to write to. None writes to the working directory

  • file_type (FileTypes) – CSV or CSV_GZ

Returns:

None

Raises:

ValueError – if file_type is neither CSV nor CSV_GZ, or if df is empty

Return type:

None