CSV
This functionality is in Beta! Beta functionality may have bugs and may change in the future. Help us out by testing this functionality and letting us know if you encounter any issues.
CSVHandler
Use this object to create a handler for reading and writing local CSV files.
Parameters (None)
Output A CSVHandler object you can use to read and write CSV files
read
Use this function to read multiple CSV files form your local machine
Parameters
(required)
folder_name
: A string name of the folder that contains your CSV filesfile_names
: A list of strings with the exact file names to read(default)
None
: Read all the CSV files that are in the specified folder<list>
: Only read the list of CSV files that are in the list
(default)
{ 'parse_dates': False, 'low_memory': False, 'on_bad_lines': 'warn'}
: Do not infer any datetime formats, assume low memory, or error if it's not possible to read a line. (Use all the other defaults of theread_csv
function.)
write
Use this function to write synthetic data as multiple CSV files
Parameters
(required)
folder_name
: A string name of the folder where you would like to write the synthetic data(default)
{ 'index': False }
: Do not write the index column to the CSV. (Use all the other defaults of theto_csv
function.)
file_name_suffix
: The suffix to add to each filename. Use this if to add specific version numbers or other info.(default)
None
: Do not add a suffix. The file name will be the same as the table name with a.csv
extension<string>: Append the suffix after the table name. Eg. a suffix
'_synth1'
will write a file astable_synth1.csv
mode
: A string signaling which mode of writing to use(default)
'x'
: Write to new files, raising errors if any existing files exist with the same name'w'
: Write to new files, clearing any existing files that exist'a'
: Append the new CSV rows to any existing files
Output (None) The data will be written as CSV files
Last updated