IndexError:索引1491188345超出了大小为1491089723的轴0的范围 [英] IndexError: index 1491188345 is out of bounds for axis 0 with size 1491089723

查看:161
本文介绍了IndexError:索引1491188345超出了大小为1491089723的轴0的范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据框df,它具有646585行和3列,看起来像:

I have a dataframe,df with 646585 rows and 3 columns which looks like :

index      inp       aco         count                
  0       2.3.6.   dp-ptp-a2f   22000
  1       2.3.12.  ft-ptp-a2f   21300
  2       2.5.9.   dp-ptp-a2f   21010
  3       0.8.0.   dp-ptp-a4f   20000
  4       2.3.6.   ft-ptp-a2f   19000               
  5       2.3.6.   ff-ptp-a2f   18500        
  ...                            ...
  ...                            ...   
  ...                            ...                 

我尝试使用以下代码来旋转数据框:

I tried to pivot the dataframe using the code:

df1=df.pivot_table(values='count', index='inp', columns='aco',fill_value=0)
print(df1)

但我知道了

IndexError: index 1491188345 is out of bounds for axis 0 with size 1491089723

推荐答案

打开熊猫问题描述此错误.

AFAIK当前没有提供解决方案/解决方法,只是减少了数据集

AFAIK currently there is no solution/workaround provided, except reducing the data set

这篇关于IndexError:索引1491188345超出了大小为1491089723的轴0的范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆