keepononon_____ 2021-11-02 18:41 采纳率: 77.8%
浏览 88
已结题

python。OverflowError: Python int too large to convert to C int

import pandas as pd
import openpyxl
from pandas import DataFrame
Expore= pd.read_excel('sales_FINAL.xlsx',sheet_name='Sheet1')
Expore["SO+LINE"]= Expore['Sales Doc'].map(str)+Expore['Sales Doc Item'].map(str)
column1= Expore['SO+LINE']
column2= Expore['Created By']
Expore=pd.DataFrame({"SO+LINE":column1,
                 "Created By":column2,
                    })
Expore.drop_duplicates(subset='SO+LINE',inplace=True,keep='first')
Expore.to_excel('open_new.xlsx',sheet_name='GTS Blocked SO',index=None,header=True)

数据是如下这样。Sales Doc为文本格式或者数字。然后run下来就报错
Sales Doc Sales Doc Item
3000561929 10
3000564356 10
3000568582 60
3000570574 10
3000571113 10
3000575647 60
3000576468 10
3000576560 10
3000576715 10
3000576722 10
3000577644 20
3000578679 10

  • 写回答

1条回答 默认 最新

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 11月4日
  • 创建了问题 11月2日

悬赏问题

  • ¥15 jetson nano
  • ¥15 :app:debugCompileClasspath'.
  • ¥15 windows c++内嵌qt出现数据转换问题。
  • ¥20 公众号如何实现点击超链接后自动发送文字
  • ¥15 用php隐藏类名和增加类名
  • ¥15 算法设计与分析课程的提问
  • ¥15 用MATLAB汇总拟合图
  • ¥15 智能除草机器人方案设计
  • ¥15 对接wps协作接口实现消息发送
  • ¥15 SQLite 出现“Database is locked” 如何解决?