I am trying to create a transaction and product groups matrix but I have a very large transaction data (over 10,000,000 rows) and around 100 product groups. When I try to create a pivot table using this code
df.pivot(index='transaction_id', columns='product_group', values='ratings')
It returned values error "Unstacked DataFrame is too big, causing int32 overflow"
Is there anyway to deal with this issue other than decrease the size of the data?
Thanks!