Script: newline caused append behavior (undesirable).
This commit is contained in:
parent
8ec8c2f302
commit
a0f062cdf5
|
@ -106,8 +106,7 @@ stage3 = "InputFile-pycleaned.csv"
|
||||||
|
|
||||||
## i.e., (1.01) -> -1.01 (1,000.00) -> -1000.00
|
## i.e., (1.01) -> -1.01 (1,000.00) -> -1000.00
|
||||||
|
|
||||||
with open(stage2) as fin, open(stage3, 'w', newline='') as fout:
|
with open(stage2) as fin, open(stage3, 'w') as fout:
|
||||||
|
|
||||||
rdr = csv.reader(fin, quoting=csv.QUOTE_ALL)
|
rdr = csv.reader(fin, quoting=csv.QUOTE_ALL)
|
||||||
wtr = csv.writer(fout)
|
wtr = csv.writer(fout)
|
||||||
|
|
||||||
|
@ -158,4 +157,4 @@ with open(stage2) as fin, open(stage3, 'w', newline='') as fout:
|
||||||
os.remove(stage1)
|
os.remove(stage1)
|
||||||
os.remove(stage2)
|
os.remove(stage2)
|
||||||
|
|
||||||
print("Input file ready")
|
print("Input file ready")
|
||||||
|
|
Loading…
Reference in New Issue