📌  相关文章
📜  加载文件夹中的所有 csv 文件 python pandas - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:18.328000             🧑  作者: 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)