Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pandas dataframe from multiple csv

# credit to Stack Overflow user in source link

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)
Comment

PREVIOUS NEXT
Code Example
Python :: image to array keras 
Python :: pil save image 
Python :: df invert sort index 
Python :: add trendline to plot matplotlib 
Python :: python counter get most common 
Python :: df to excel 
Python :: group by count dataframe 
Python :: python diamond pattern 
Python :: matlab find in python 
Python :: print matrix eleme 
Python :: convert categorical variable to numeric python 
Python :: aioschedule python 
Python :: how to do processing on html file using python 
Python :: get wav file in dir 
Python :: elbow method k means sklearn 
Python :: split imagedatagenerator into x_train and y_train 
Python :: python replace newline 
Python :: primes in python 
Python :: streamlit button to load a file 
Python :: python check if variable is string 
Python :: yesno django 
Python :: how to get current time in milliseconds in python 
Python :: python exit program 
Python :: the four pillars of Op in Python 
Python :: pyautogui install 
Python :: django template iterate dict 
Python :: kaaba python tutorial 
Python :: phi 
Python :: delete row from dataframe python 
Python :: rabbitmq pika username password 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =