I have a folder with many .csv files in it with the following format:
FGS07_NAV_26246_20210422_86oylt.xls
FGS07_NAV_26246_
is always the same, 20210422
is the date and the most important parameter to go and pick the file, _86oylt
also changes but not important at all.
I need to read one csv file with the same date as the operation date.
let’s think that y
is our date part, so I tried this code, but it doesn’t give me the write name:
file2 = r'C:/Users/name/Finance/LOF_PnL/FGS07_NAV_26246_' + y + '*.xls'
df2 = pd.read_excel(file2)
How should I fix?