Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

read a large dataframe in pandas

filename='../input/*.csv'
chunksize=10**6
reader = pd.read_csv(filename,chunksize=chunksize, 
                    low_memory=False)    
train=pd.DataFrame()
for i, chunk in enumerate(reader):
    train=pd.concat([train,chunk],axis=0)
 
PREVIOUS NEXT
Tagged: #read #large #dataframe #pandas
ADD COMMENT
Topic
Name
2+4 =