Forked from abhijeet-talaulikar/mta-credit-card-data.py
Created
September 27, 2023 16:04
-
-
Save Sandy4321/21c8b0919f75260d40c8b8d82a72284e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
campaign_data = pd.read_csv("cashback_activation_data.csv") | |
campaign_data = campaign_data.sort_values(['customer_id', 'timestamp'], | |
ascending=[False, True]) | |
campaign_data['visit_order'] = campaign_data.groupby('customer_id').cumcount() + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment