For numbers with a decimal separator, by default Python uses float and Pandas uses numpy float64. Internally float types use a base 2 representation which is convenient for binary computers. Python's ...
Pythonの四捨五入ですぐに思う浮かぶのはround()ですが、このメソッドは一般的な四捨五入にはなっていません。 round()は「銀行家の丸め」と呼ばれる丸め方を採用しており、丸め対象が5の場合、結果が偶数になる方に丸めるようになっているためです。
Currently, when one wants to use a decimal datatype in Pandas, the only possibility is to use the decimal.Decimal standard-libary type. This is then an "object" column in the DataFrame. Arrow can ...