Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to define dtype of each column before actually reading csv file

import pandas as pd 

# ...[.].csv = your .csv file 
# datatype = dtype you want to define.
read = pd.read_csv('......[.]csv',dtype={'name_column':'datatype'})
 
PREVIOUS NEXT
Tagged: #define #dtype #column #reading #csv #file
ADD COMMENT
Topic
Name
8+7 =