Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

but I got

IndexError: index 1491188345 is out of bounds for axis 0 with size 1491089723
like image 703
Bode Avatar asked Jan 28 '18 23:01

Bode


1 Answers

There is open Pandas issue describing this error.

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

like image 135
MaxU - stop WAR against UA Avatar answered Nov 09 '22 21:11

MaxU - stop WAR against UA