Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Financial Accounting for Business

Authors: Thomas Edmonds, Christopher Edmonds

1st edition

1260299449, 978-1260299441

More Books

Students also viewed these Algorithms questions

Question

What, if any, financial support do they provide their students?

Answered: 1 week ago

Question

what is C + + ? What is object oriented programming ?

Answered: 1 week ago