1

I am trying to transform the following dataset

enter image description here

This dataset contains about a million rows of customer transaction data. Columns are broken down as follows:

Date - the date of the transaction
Card Number - the unique identifier for each client ( can repeat if client shops multiple times during designated time period)
Visit Accrued - will always be 1 this is simply stating that the client visited once per transaction
Check Subtotal Accrued - the amount spent in the transaction

I am using the Lifetimes Package - lifetimes.utils.summary_data_from_transaction_data to transform the data

My code looks as follows -

clv = lifetimes.utils.summary_data_from_transaction_data(df,
                                                     'Card Number',
                                                     'Date',
                                                     'Check Subtotal Accrued')

When I run that I get the error "AttributeError: 'DataFrame' object has no attribute 'ix'" Which does not make sense to me since I have no 'ix' in the code. My original thought was it might have to do with my dtypes which are as follows:

enter image description here

Nothing has worked up to now. What can I try next?

halfer
  • 19,824
  • 17
  • 99
  • 186

0 Answers0