Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

load all csv files in a folder python pandas

import pandas as pd
import glob

path = r'C:DRODCL_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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #load #csv #files #folder #python #pandas
ADD COMMENT
Topic
Name
6+5 =