I have pandas DataFrame like below:
col1 | number
--------------------
acb_sum | 500.000
deff | 0.509
ghi | 0.342
In my table "col1" is index and I need round values only in these columns where index ends with "_sum".
So as a result I need to have something like below:
col1 | number
--------------------
acb_sum | 500
deff | 0.509
ghi | 0.342
Because only in the first row index ("col1") ends with "_sum" so we round value there to zeroes places after dot.
How can I do that in Python Pandas ?