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

Solutions on MaxInterview for how to define dtype of each column before actually reading csv file by the best coders in the world

showing results for - "how to define dtype of each column before actually reading csv file"
Catalina
26 Jan 2017
1import pandas as pd 
2
3# ...[.].csv = your .csv file 
4# datatype = dtype you want to define.
5read = pd.read_csv('......[.]csv',dtype={'name_column':'datatype'})