📜  python导入多个csv - Python代码示例

📅  最后修改于: 2022-03-11 14:46:29.893000             🧑  作者: Mango

代码示例1
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)