Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to read multiple csv file from different directory in python

import csv
import pandas

df_list = []
path = "C:/Users/bubai/Desktop/try/scrapy/output"
#all csv file
for file in os.listdir(path):
    #print(file)
    df_list.append(file)  # all csv file in this
#print(df_list) 
for i in df_list:
    df = pandas.read_csv(i)  # open one by one 
    print(df)
Comment

how to read multiple csv file from different directory in python

import csv
import pandas

df_list = []
path = "C:/Users/bubai/Desktop/try/scrapy/output"
#all csv file
for file in os.listdir(path):
    #print(file)
    df_list.append(file)  # all csv file in this
#print(df_list) 
for i in df_list:
    df = pandas.read_csv(i)  # open one by one 
    print(df)
Comment

how to read multiple csv file from different directory in python

import csv
import pandas

df_list = []
path = "C:/Users/bubai/Desktop/try/scrapy/output"
#all csv file
for file in os.listdir(path):
    #print(file)
    df_list.append(file)  # all csv file in this
#print(df_list) 
for i in df_list:
    df = pandas.read_csv(i)  # open one by one 
    print(df)
Comment

PREVIOUS NEXT
Code Example
Python :: how to find an element in a list python 
Python :: Display max number of columns pandas 
Python :: python datetime format string 
Python :: fork function in python 
Python :: virtual env python 2 
Python :: pandas check if column is sorted 
Python :: pandas get value not equal to 
Python :: takes 1 positional argument but 2 were given python 
Python :: python dict for k v 
Python :: one line if statement no else 
Python :: git help 
Python :: read file contents python 
Python :: how to make a multiple choice quiz in python with tkinter 
Python :: how to loop over list 
Python :: how to redirect to previous page in django 
Python :: textclip python arabic 
Python :: merge subplot matplotlib 
Python :: slicing of tuple in python 
Python :: django add middleware 
Python :: show all rows for dataframe 
Python :: find sum of factors of a number python 
Python :: how to count how many cameras you have with python 
Python :: python zip folder 
Python :: midpoint 
Python :: json decode py 
Python :: encrypt string with key python 
Python :: bot ping command 
Python :: create qr code in python 
Python :: python sort dictionary by value 
Python :: camel case in python 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =