Pandas - youdar/How-to GitHub Wiki
Pandas tips
Saving to CSV
When saving a DataFrame to a CSV pandas will save integers as floats
for example 1 -> 1.0
This will cause a problem if you try to load the data into some database where particular columns
are set as type int
Further more, the data may contain NaN or None values, that you want to keep.
To overcome this something like:
df.fillna('').astype(np.str).applymap(lambda x: x[:-2] if x.endswith('.0') else x)
Not very elegant, but works...