# select columns that need to be converted cols = df.select_dtypes(include=['float64']).columns.to_list() df = df.astype({col:int for col in cols})