python directory not read as string
I have a script in python where I want to read in a path to a directory in order to read in the files within this directory.
When debugging it throws me an error.
When I specify the path within the function it all works, however if I specify it outside the function it throws me an error
path = "users/folder"
def read_data(path):
directory_csv = path
for filename in os.listdir(path): # here it throws me the error
if filename.endswith('.csv'):
file_path = os.path.join(path,...