valpas.io.export_csv#
- valpas.io.export_csv(filepath_or_buffer, data, overwrite=False, index=True)#
Helper function to export computed DataFrame to csv formated plain text.
- Parameters:
filepath_or_buffer (str | PathLike | Path | TextIOBase) – Path to the *.csv that should be used for the export of data. Can also be of type TextIOBase e.g. if the passed argument is a stream to sys.stdout
data (pandas.DataFrame) – Single pandas.DataFrame that contains the data to be stored.
overwrite (bool, default=False) – If passed to the function as ‘True’, then the csv-file that is pointed to by
filepath_or_bufferwill be overwritten if it already exists.index (bool, default=True) – Passed to
pd.DataFrame.to_csv. Determines if the index ( row names) should be written to the output.
- Return type:
None
- Raises:
FileExistsError – If file pointed to by
filepath_or_bufferalready exists and overwrite==FalseTypeError – If
filepath_or_bufferpassed to function is not of a ‘legal’ type.