Skip to content
Advertisement

Convert floats to ints in Pandas?

I’ve been working with data imported from a CSV. Pandas changed some columns to float, so now the numbers in these columns get displayed as floating points! However, I need them to be displayed as integers or without comma. Is there a way to convert them to integers or not display the comma?

Advertisement

Answer

To modify the float output do this:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement