A python program that searches for CSV files in a given folder. Calculates the percentage change between
Fantastic news! We've Found the answer you've been seeking!
Question:
A python program that searches for CSV files in a given folder. Calculates the percentage change between two columns and adds these values (percentage change) as another column in the CSV file. Without using Pandas. I am struggling to figure out how to go about this without using Pandas. So far this is what I have.
For search:
import os
directory = os.path.join("c:\\","path")
for root,dirs,files in os.walk(directory):
for file in files:
if file.endswith(".csv"):
f=open(file, 'r')
# this is where I would perform the calculations into the CSV files
f.close()
Please help me
Related Book For
Introductory Financial Accounting for Business
ISBN: 978-1260299441
1st edition
Authors: Thomas Edmonds, Christopher Edmonds
Posted Date: