This Python script is designed to extract and filter specific columns from CSV (Comma-Separated Values) files. It provides a convenient way to preprocess CSV data by selecting desired columns and generating a new CSV file with the filtered data.
Extracts and filters CSV data based on specified column criteria. Simplifies data preprocessing tasks by creating a new CSV file containing only the selected columns. Easy to customize: simply update the file paths and column names as needed.- Ensure you have Python installed on your system.
- Clone this repository to your local machine.
- Open the script in your preferred Python editor.
- Update the file paths (
original_csv_path
andfiltered_csv_path
) and specify the columns you want to keep (columns_to_keep
). - Run the script to generate the filtered CSV file.
An interactive Google Colab version of this CSV trimming script is also available. You can access and run the script directly in a Colab environment for easy experimentation and data processing.