Created
December 27, 2019 02:54
-
-
Save hadinh1306/aac8f87d399aeaa2c8be1a46ef576315 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
| def _get_sample_data(AccountCode): | |
| """This function gets subscription info, login events and republish events for the AccountCode input. | |
| Args: | |
| AccountCode (str): Account unique identification. | |
| Returns: | |
| pandas.core.frame.DataFrame: 3 dataframes with subscription info, login and republish events. | |
| """ | |
| sample_subscription = subscription_info_df[subscription_info_df['AccountCode'] == AccountCode] | |
| sample_republished = republished_df[republished_df['AccountCode'] == AccountCode] | |
| sample_login = login_df[login_df['AccountCode'] == AccountCode] | |
| # this is a constant for visualization purpose | |
| sample_subscription['vizline'] = 0.5 | |
| sample_republished['vizline'] = 0.5 | |
| sample_login['vizline'] = 0.5 | |
| return sample_subscription, sample_republished, sample_login |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment