Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

import all csv python

# Needed packages
import glob
import pandas as pd

# Import all csv files
files = glob.glob("Path/*.csv")

# Import them as individual Dataframe

count = 0
for f in files:
    count += 1
    exec(f'df_{count} =pd.read_csv(f)')
    print(f'DataFrame: df_{count}')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #import #csv #python
ADD COMMENT
Topic
Name
6+8 =