marketing-analytics/predicting/future-customer-value-segments/common/__init__.py [524:536]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    customer_id, records = customer_records

    number_of_transactions = 0
    tot_sales = 0.0
    min_date = None
    max_date = None
    for r in records:
        number_of_transactions += 1
        tot_sales += r[3]  # sales
        if not min_date or r[2] < min_date:  # date
            min_date = r[2]
        if not max_date or r[2] > max_date:
            max_date = r[2]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



marketing-analytics/predicting/future-customer-value-segments/common/__init__.py [566:578]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    customer_id, records = customer_records

    number_of_transactions = 0
    tot_sales = 0.0
    min_date = None
    max_date = None
    for r in records:
        number_of_transactions += 1
        tot_sales += r[3]  # sales
        if not min_date or r[2] < min_date:  # date
            min_date = r[2]
        if not max_date or r[2] > max_date:
            max_date = r[2]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



