小编Luc*_*lin的帖子

Int 太大而无法在执行 .astype(int) 时转换为 C long

我运行一个python脚本,在那里我有一个字符串列从熊猫转换dfint使用astype(int)方法。但是,我收到以下错误:

"Python int too large to convert to C long"
Run Code Online (Sandbox Code Playgroud)

我的字符串都是字符串格式的数字,最多15个字符。有没有办法将此列转换为 int 类型而不会弹出此错误?

python numpy pandas

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

numpy ×1

pandas ×1

python ×1