Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Read multiple files in the same directory
import glob
path = r'path to file' # use your path
all_files = glob.glob(path + "/*.csv")
li = []
for filename in all_files:
df = pd.read_csv(filename, index_col=None, header=0,sep=',|;')
print(filename)
li.append(df)
df = pd.concat(li, axis=0, ignore_index=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.