How can I read a file that ends with csv in a certain path?
import pandas as pd
df = pd.read_csv('C:\Users\*.csv')
Thanks
How can I read a file that ends with csv in a certain path?
import pandas as pd
df = pd.read_csv('C:\Users\*.csv')
Thanks
There are multiple ways of doing it. Here is my answer.Use glob module and make a for/while loop of all the files.
import glob
listcsv=glob.glob('C:\Users\*.csv')
for i in listcsv:
df=pd.read_csv(i)