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
There is open Pandas issue describing this error.
AFAIK currently there is no solution/workaround provided, except reducing the data set
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With