Splitting a List into Multiple Lists


Updated: October 1, 2022


A showcase of a Python script to split a list into multiple lists based on a column.

If you deal with data as part of your business, you must have stumbled upon this problem every now and then. Many of you look for a solution in Excel or Google Sheets, but a solution in Python is a lot more convenient, especially when you have access to online spaces like Jupyter Notebooks or Google Colab.

Problem Statement

Split a spreadsheet into different spreadsheets based on a column in the spreadsheet.


Input

A CSV file consisting of all data.


Output

  1. Separate Lists as Multiple CSVs.
  2. Single Excel (XLSX) file with Multiple tabs.


Steps

  1. Enter the name of the input file.
  2. Select the column you want to use to split the file.
  3. Select the output format (CSV or XLSX).
  4. If the output format is CSV, look for CSV files named after values in the column used for splitting the file.
  5. If the output format is XLSX, look for an XLSX file with tabs named after values in the column used for splitting the file.


In case you’re interested in this script, developed using Python, click here!


Output Samples

Contact

Thank you. I will respond within 24 hours.

Client Portal | Internal Tools | Web App Builder | Free Website Builder Made with Softr