['a', 'b', 2006.0, 2005.0, 1995.0]
print([(int(col) if type(col) == float else col) for col in df.columns])
['a', 'b', 2006, 2005, 1995]
df.columns = [(int(col) if type(col) == float else col) for col in df.columns]
['a', 'b', 2006, 2005, 1995]
How to edit several elements in df.columns