pandas code, If a float column with 1.0, 2.0, 3.0, remove all the .0 columns = pd_df.columns.difference(["date"]) pd_df[columns] = pd_df[columns].map(lambda x: int(x) if x.is_integer() else x) Continue reading...