我有一个 DataFrame,其中一列由浮点型对象组成。我想转换为 int。正如我所尝试的,.astype("int")
和 astype(int)
方法都有效。我只是想知道是否有任何区别?
最佳答案
关于python - .astype ("int") 或 .astype(int)?有和没有引号/双引号之间有什么区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41791947/
我有一个 DataFrame,其中一列由浮点型对象组成。我想转换为 int。正如我所尝试的,.astype("int")
和 astype(int)
方法都有效。我只是想知道是否有任何区别?
最佳答案
关于python - .astype ("int") 或 .astype(int)?有和没有引号/双引号之间有什么区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41791947/
相关文章:
python - 狮身人面像 : force rebuild of html, 包括 autodoc
python Pandas : How to group by and count unique values based on multiple columns?
python - Keras 没有使用完整的 CPU 内核进行训练
python - 如何将 scipy 行矩阵转换为 numpy 数组
python - Tkinter,Windows : How to view window in windows task bar which has no title bar?
python - 如果某个时间在某个时间范围内,则查找该时间并返回 Pandas 中的相应值?