我运行一个python脚本,在那里我有一个字符串列从熊猫转换df到int使用astype(int)方法。但是,我收到以下错误:
df
int
astype(int)
"Python int too large to convert to C long"
我的字符串都是字符串格式的数字,最多15个字符。有没有办法将此列转换为 int 类型而不会弹出此错误?
python numpy pandas
numpy ×1
pandas ×1
python ×1