8000 added csv_split · ThinkCode/python-scripts@9c02c43 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9c02c43

Browse files
committed
added csv_split
1 parent 9828e28 commit 9c02c43

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

12_csv_split.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
8-
Splits a CSV file into multiple pieces based on command line arguments.
8+
Splits a CSV file into multiple files based on command line arguments.
99
1010
Arguments:
1111
@@ -99,7 +99,7 @@ def parse_file(arguments):
9999
header = all_rows.pop(0)
100100

101101
# Split list of list into chunks
102-
current_chunk = 0
102+
current_chunk = 1
103103
for i in range(0, len(all_rows), row_limit): # Loop through list
104104
chunk = all_rows[i:i + row_limit] # Create single chunk
105105

readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
1. **09_basic_link_web_crawler.py**: web crawler for grabbing links from a website
1212
1. **10_find_files_recursively.py**: recursively grab files from a directory
1313
1. **11_optimize_images_with_wand.py**: recursively grab images from a directory, then optimize them for the web
14+
1. **12_csv_split.py**: Splits a CSV file into multiple files based on command line arguments.

0 commit comments

Comments
 (0)
0