0
import pandas as pd
import glob
df = pd.read_excel("C:/Users/janardhan.reddy/Desktop/Input/**April**.xlsx")

This is my code to read the file from direct path and file name (Jupyter NoteBook) Q. if i change the file in folder i have to change the file name in path also. So is there any script for to pick the file name directly.(path remains constant)

mauve
  • 2,707
  • 1
  • 20
  • 34
  • Are you asking how to prompt for the file to be selected? – mauve Sep 24 '19 at 14:17
  • you could use something like [this](https://stackoverflow.com/questions/168409/how-do-you-get-a-directory-listing-sorted-by-creation-date-in-python) to find the newest file to read – Sobhan Sep 24 '19 at 14:25

0 Answers0