Question: PROGRAM: READ CSV FILES INTO PANDAS DATAFRAMES USING PYTHON. Create a program in python using pandas dataframe. Program should be able to read a folder

PROGRAM: READ CSV FILES INTO PANDAS DATAFRAMES USING PYTHON.

Create a program in python using pandas dataframe. Program should be able to read a folder of csv files( one should be able to change the path to indicate the folder) and insert them into one new Pandas Dataframe. All csvs have the same columns. Every csv file in the folder must be added to the dataframe as an individual row. This will be done by taking the mean of every column in every file. Example: If your csv folder has 20 csv files and each file has 100 rows and 8 columns. The final data frame should have 20 rows and 8 columns, every row indicating the mean of the columns on each file.

Create functions to:
-Add and remove desired colums and rows.
-Take mean of each column in each file.
-One file in the folder should equal one row in the new data frame.
-Add index column as the name of the file in the folder. (each row is identified by its file name in the folder)
-Create a function to take the max values of column. (Just create, no need to implement)


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!