ganeshan / HelpfulHopeful

Python CSV splitter - Split by column

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HelpfulHopeful

Author: NRoot

Purpose: for splitting up large UNSORTED CSV files based on a category. For instance, if working with a file containing data on an entire state you can run the data through this program and split it up based on county, assuming you know which column that information is stored.

Python version: 3.6

How to run: if you have python 3 installed, you should be able to simply double click the file and the program prompts should initiate.

Run time: When run on 4.5 GB CSV, splitting into about 20 or so files, program execution took around 15-20 minutes.

Haven't cleaned it up yet, so it's not as condensed as could be, but it will certainly get the job done.

Referenced code by Jrivero at https://gist.github.com/jrivero/1085501 (Which in turn was based on palewire's https://gist.github.com/palewire/596056/0f58641aba18979e9d5c1b918aeca623487fb599) when writing this program

Date modified: July 2, 2019

About

Python CSV splitter - Split by column


Languages

Language:Python 100.0%