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)
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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
