Answers for "load all csv files in a folder python pandas"

0

load all csv files in a folder python pandas

import pandas as pd
import glob

path = r'C:\DRO\DCL_rawdata_files' # 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)
    li.append(df)

frame = pd.concat(li, axis=0, ignore_index=True)
Posted by: Guest on September-29-2021

Code answers related to "load all csv files in a folder python pandas"

Python Answers by Framework

Browse Popular Code Answers by Language