Reduce data length to train effectively I have  customer buying data with each row specifying an item bought by customer. The problem is that even if at the same time customer buys five items then there are five different rows for it and as a result the total number of rows in data have gone too much to train. what can i do to reduce the size of data so that i can train it effectively.Just to give the context of the problem, i want to recommend products to the customers based on their buying data.

Dataset size: (7981262, 16)

Data description:

Variable                                           Description
customerID                                    unique customer ID
DOB                                         date of birth of customer
Gender                                               gender
State                                          customer's state
PinCode                                pincode of area where customer lives
transactionDate                                  date of transaction
store_code                                 unique code of store
store_description                             description of store
till_no                                       counter no. in the store
transaction_number_by_till                 unique transaction number by counter, 
transactionDate, store_code
promo_code                      if promotional code (offer) used in the transaction
promo_description                            description of the offer
product_code                               unique code of the product purchased
product_description                       description of the product purchased
sale_price_after_promo                 sale price of the product after applying 
promotion
discountUsed                  after promo, customer used this discount(s) on transaction
If your total dataset size is too much, take a random sample of n%. I suggest taking a sample of n% of users, then using all rows for each of those sampled users. If you have timestamps, I further suggest making your train/test split based on time. I.e., for a user with 10 purchased items, train on her first 8 items and try to predict her last 2 items.