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

Skip to content
< 8000 header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark>

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 0 deletions
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