Linked Questions

781 votes
20 answers
1.0m views

Import multiple CSV files into pandas and concatenate into one DataFrame

I would like to read several CSV files from a directory into pandas and concatenate them into one big DataFrame. I have not been able to figure it out though. Here is what I have so far: import glob ...
jonas's user avatar
  • 14k
14 votes
3 answers
28k views

Using pandas Combining/merging 2 different Excel files/sheets

I am trying to combine 2 different Excel files. (thanks to the post Import multiple excel files into python pandas and concatenate them into one dataframe) The one I work out so far is: import os ...
Mark K's user avatar
  • 9,496
1 vote
3 answers
7k views

python efficient way to append all worksheets in multiple excel into pandas dataframe

I have around 20++ xlsx files, inside each xlsx files might contain different numbers of worksheets. But thank god, all the columns are the some in all worksheets and all xlsx files. By referring to ...
yc.koong's user avatar
  • 175
0 votes
2 answers
10k views

How to read all excel files under a directory as a pandas dataframe [duplicate]

I have a couple of excel sheets (using pd.read_excel ) under a directory and would like to read them as a pandas and add them to a list. so my list should end up having multiple dataframe in it. How ...
HHH's user avatar
  • 6,536
2 votes
2 answers
2k views

Import multiple excel sheets from different files into python and concatenate them into one dataframe

I am trying to combine multiple sheets from different excel files into one dataframe. All the files have multiple sheets, and one of these sheets has the same name in all the files - this is the sheet ...
Leo's user avatar
  • 89
2 votes
2 answers
3k views

Calculate Percentage using Pandas DataFrame

Of all the Medals won by these 5 countries across all olympics, what is the percentage medals won by each one of them? i have combined all excel file in one using panda dataframe but now stuck with ...
Saud Ansari's user avatar
0 votes
1 answer
3k views

Python 3 - Merging an .xls / deleting rows / removing duplicates

I am attempting to combine 3 .xls files - and want to do this in python3. I need to delete the some rows first then combine them into one .xls , then remove duplicates.(i will later manipulate the ...
Kuzen's user avatar
  • 980
1 vote
1 answer
1k views

How to add a date from filename to a time column to make datetime column? Python Pandas

I have multiple files that are named like this 2018-08-31-logfile-device1 2018-09-01-logfile-device1 in these files the data is sorted this way: 00:00:00.283672analogue values:[2511, 2383, 2461, ...
Martijn van Amsterdam's user avatar
1 vote
2 answers
1k views

How to only import all excel files from a directory

I need to import all excel files in my directory, including sub directories, but I keep getting into an error message because there are other types of files in the same directory such as pdf and word. ...
user avatar
0 votes
2 answers
608 views

Read multiple files in python and combine filenames and content into a dataframe

I have the following lists in python created by reading files files_list = ["A", "B", "C", "D"] The contents of the files are character vectors as follows A = [...
Raghavan vmvs's user avatar
0 votes
3 answers
1k views

Convert excel file with many sheets (with spaces in the name of the shett) in pandas data frame

I would like to convert an excel file to a pandas dataframe. All the sheets name have spaces in the name, for instances, ' part 1 of 22, part 2 of 22, and so on. In addition the first column is the ...
Oscar's user avatar
  • 1
0 votes
2 answers
1k views

Import multiple excel files start with same name into pandas and concatenate them into one dataframe

I have everyday multiple excel files with different names, but all these files start with the same name, for instance, "Answer1.xlsx", "AnswerAVD.xlsx","Answer2312.xlsx", ...
Kardu's user avatar
  • 895
1 vote
1 answer
1k views

How read excel from folder without specify excel name?

I want to read_excel from folder and load into database, but the excel will refresh every week and change name (ReportWK01, ReportWK02,...) In that folder (names To_Load) is only the one excel I need. ...
Kateřina Chábová's user avatar
0 votes
1 answer
338 views

How to concat excels with multiple sheets into one excel?

The folder contains at least 20 excels. Each excel contains nine sheets. These excels have same type of sheets (same header but different data). I need to concat these 20 excels sheet by sheet into ...
buzzmind's user avatar
  • 109
0 votes
0 answers
640 views

Importing numerous excel files with unknown sheet names into panda

I've been following these links: Import multiple excel files into python pandas and concatenate them into one dataframe & Import multiple csv files into pandas and concatenate into one DataFrame ...
Aka_Minimal's user avatar

15 30 50 per page