I have a users.csv file on the same folder as my python script. I use this to read through the folder:
users = []
with open(r"users.csv", encoding='UTF-8') as f:
Is there a way to automatically read any .csv files within the directory without having to put "users.csv"
?
Not sure how to word it but i'll give some context.
I have 10 folders, all folders have 1 users.csv file inside as well as a script that reads such file. Every time i have to switch the .csv file i have to rename it 10 times across all folders so the script reads it. Is there any way to automatically read the file if its in a csv format?