📌  相关文章
📜  来自多个 csv 的 pandas 数据帧 - Python 代码示例

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

代码示例1
# credit to Stack Overflow user in source link

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)