I read data from a .csv file to a Pandas dataframe as below. For one of the columns, namely id, I want to specify the column type as int. The probl
id
int
If you want to use it when you chain methods, you can use assign:
df = ( df.assign(col = lambda x: x['col'].astype('Int64')) )