split_csv

split_csv(input_file: str, output_dir: str, lines_per_file: int = 5000) None[source]

Split a CSV file into multiple smaller CSV files.

Parameters:
  • input_file (str) – Path to the input CSV file.

  • output_dir (str) – Directory to save the split CSV files.

  • lines_per_file (int) – Number of lines per output file.