概述
我想你可以查看NA type promotions:
When introducing NAs into an existing Series or DataFrame via reindex or some other means,boolean and integer types will be promoted to a different dtype in order to store the NAs. These are summarized by this table:
Typeclass Promotion dtype for storing NAs floating no change object no change integer cast to float64 boolean cast to object
While this may seem like a heavy Trade-off,in practice I have found very few cases where this is an issue in practice. Some explanation for the motivation here in the next section.
总结
以上是编程之家为你收集整理的python – Pandas读取sql整数变为浮点数全部内容,希望文章能够帮你解决python – Pandas读取sql整数变为浮点数所遇到的程序开发问题。
如果您也喜欢它,动动您的小指点个赞吧