How to trim value to two places after dot without rounding, python

后端 未结 3 873
后悔当初
后悔当初 2021-01-29 02:46

I am searching for fastest method to get each value in my column with only two digits after dot without using round()

pd.Series:

input:

3条回答
  •  难免孤独
    2021-01-29 03:19

    Floor div

    s//0.01/100
    0      1.42
    1     12.33
    2    111.66
    3      2.05
    Name: dol, dtype: float64
    

提交回复
热议问题