Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

import all csv as individual dataframes 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 #individual #dataframes #python
ADD COMMENT
Topic
Name
5+9 =