Using Python3 I'm trying to read the newest csv file using pandas in the path and directory specified; but I'm receiving "NotADirectoryError" on "latest_file = os.listdir(latest_date)[-1].
import pandas as pd
import os
#naming path for most recent file
path='/filepath/'
#specifying full path
latest_date = path+os.listdir(path)[-1]+'/'
#identifying newest file in directory
latest_file = os.listdir(latest_date)[-1]
csv_to_read=pd.read_csv(latest_date+latest_file)
display(csv_to_read)