Created
September 29, 2020 14:11
-
-
Save merltron-pa/728df9fdf2bc68b72fdae587407565a6 to your computer and use it in GitHub Desktop.
multitouch_article_pt2
This file contains 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
#basic transformation on the dataframe to have the right format | |
ga_raw_data = ga_raw_data.filter(items=['date', 'user_id', 'journey_id', 'utm_medium', 'submitted_applications']) | |
ga_raw_data = ga_raw_data.sort_values(by=['date', 'user_id'], ascending=True) | |
ga_raw_data['submitted_applications'] = ga_raw_data['submitted_applications'].astype(str).astype(int) | |
ga_raw_data['date'] = pd.to_datetime(ga_raw_data['date']) | |
ga_raw_data = ga_raw_data.reset_index().drop(columns=['index']) | |
ga_raw_data.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment