sdv.tabular.ctgan.CTGAN.sample

CTGAN.sample(num_rows, randomize_samples=True, batch_size=None, output_file_path=None, conditions=None)

Sample rows from this table.

Parameters
  • num_rows (int) – Number of rows to sample. This parameter is required.

  • randomize_samples (bool) – Whether or not to use a fixed seed when sampling. Defaults to True.

  • batch_size (int or None) – The batch size to sample. Defaults to num_rows, if None.

  • output_file_path (str or None) – The file to periodically write sampled rows to. If None, does not write rows anywhere.

  • conditions – Deprecated argument. Use the sample_conditions method with sdv.sampling.Condition objects instead.

Returns

Sampled data.

Return type

pandas.DataFrame