How to read an excel file name User defined from a path using python

0 votes
How to read an excel file (name User defined) from a path using python

script that only reads an  excel file present inside a path.

pd.read_excel(filename.xlsx) is usefull to read a file with stable name . heree file names changes and i dont want to run the code every time by changing file name .
Aug 12, 2020 in Python by anonymous
• 120 points

1 answer to this question.

0 votes

Hi @There,

As the path is fixed, use the Python OS module to find all the files inside the path.

Filter all excel file (probably there will be one on very first time) and read that.

You probably delete the excel file after reading otherwise next time this may create confusion.

Also, you need to pass that filename to

answered Aug 13, 2020 by Gitika
• 65,950 points

Related Questions In Python

0 votes
1 answer

How to use read a WSDL file from the file system using Python suds?

Hi, good question. It is a very simple ...READ MORE

answered Jan 21, 2019 in Python by Nymeria
• 3,520 points
0 votes
1 answer

How to read data from a text file using Python?

Refer to the below example where the ...READ MORE

answered May 12, 2019 in Python by Sushma
0 votes
1 answer

How to create and read from a temporary file in Python?

Hi, there is a very simple solution ...READ MORE

answered Jan 29, 2019 in Python by Nymeria
• 3,520 points
0 votes
2 answers

How do you read from a file using file handling in python?

for write, read,append data in file check ...READ MORE

answered Jun 21, 2020 in Python by sahil
• 560 points
0 votes
3 answers

Python Selenium best tutorials for beginners

Hope this will help you...Python Tutorial READ MORE

answered Feb 11, 2019 in Python by aldrinjohn
• 140 points
0 votes
1 answer

I want to download a file from the website by web scraping. Can anyone explain how to do this in jupyter lab (python) with an example?

Hey, Web scraping is a technique to automatically ...READ MORE

answered Apr 7, 2020 in Python by Gitika
• 65,950 points
0 votes
3 answers

How to get the return value from a thread using python?

FWIW, the multiprocessing module has a nice interface for ...READ MORE

answered Dec 15, 2020 in Python by Roshni
• 10,480 points