I am very new to Python and Pandas and am looking for some help.
I have written Python code in order to read a monthly Excel file, manipulate the data and append it to another file. My issue is that every month the original file is renamed to match the year and date it is generated, for example last month's was "2022 McCarthy LEM_2022 Financial Reporting_20220329."
Is there a way to use pd.read_excel and have it pick up any .xlsx file name in that folder that contains "McCarthy" "LEM" or "Financial Reporting?"
I am currently just using the simple code of:
pd.read_excel("2022 McCarthy LEM_2022 Financial
Reporting_20220329.xlsx", sheet_name = "2022 Billable Work Order
Data")
Or is there a different approach I should take to remedy this issue?
Ideally, I would receive the report in an email, save the report to a folder, and then would like the start the Python script without having to change the name of the file in the code.
Thank you for any ideas and help!