Skip to content

Commit 17bb859

Browse files
Now using Visual Studio Code for development
1 parent 3aed414 commit 17bb859

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#! /usr/bin/python3.5
2+
3+
4+
"""
5+
6+
Author: Samrat Banerjee
7+
Dated: 07/09/2018
8+
Description: Project: Removes the header from all CSV files in the current working directory
9+
10+
"""
11+
12+
import os,csv
13+
14+
os.makedirs('headerRemoved',exist_ok=True)
15+
16+
# Loop through every file in the current working directory.
17+
for csvFilename in os.listdir('.'):
18+
if not csvFilename.endswith('.csv'):
19+
continue # skip non-csv files
20+
21+

extra resources/example.tsv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apples oranges grapes
2+
3+
eggs bacon ham
4+
5+
spam spam spam spam spam spam
6+

extra resources/output.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spam,eggs,bacon,ham
2+
"Hello, world!",eggs,bacon,ham
3+
1,2,3.141592,4

0 commit comments

Comments
 (0)