pe.callback.text.save_text_to_csv module

class pe.callback.text.save_text_to_csv.SaveTextToCSV(output_folder, iteration_format='09d')[source]

Bases: Callback

The callback that saves the synthetic text to a CSV file.

__call__(syn_data)[source]

This function is called after each PE iteration that saves the synthetic text to a CSV file.

Parameters:

syn_data (pe.data.Data) – The pe.data.Data object of the synthetic data

__init__(output_folder, iteration_format='09d')[source]

Constructor.

Parameters:
  • output_folder (str) – The output folder that will be used to save the CSV files

  • iteration_format (str, optional) – The format of the iteration part of the CSV paths, defaults to “09d”

_get_csv_path(iteration)[source]

Get the CSV path.

Parameters:

iteration (int) – The PE iteration number

Returns:

The CSV path

Return type:

str