MemberDecember 22, 2020 at 9:33 pm13 Coins0 Gems
Great question. Many face this conundrum, and there are actually a couple of ways to achieve this:
- Convert everything to integers – df.astype(int)
- Rounding up – df.round()
- Change your display precision option in Pandas – pd.set_option(‘precision’, 0)
Depending on the type of data you are working with, you can choose which one works best for you.
Log in to reply.