Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Conversation

@Tonyzhou98
Copy link
Contributor

No description provided.

Copy link
Contributor

@jonathancstroud jonathancstroud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the PR. Please remove the extraneous files, which includes everything other than explore.py and explore_utils.py. If you know how to do so, I recommend deleting these from git history so that they do not get added to our repo permanently. Otherwise, there are some minor comments posted for you to address. Thanks!

returns:
the name of each browser, and the average of revenue by each browser
"""
train_df = dataset.train
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do a shallow copy when you access the data. Otherwise, the line below will add "revenue" to the dataframe object and it could affect other code.

train_df = dataset.train
train_df['revenue'] = train_df['totals.transactionRevenue'].astype(float).fillna(0)
grouped_customer = train_df.groupby('device.browser')['revenue'].mean()/10000
grouped_browser = train_df.groupby('device.browser')['device.browser'].unique()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Optional) consider sorting by average revenue for more consistent results.


diff_browser, average_for_device = explore_utils.find_device_revenue_relationship(data)
for i,j in zip(diff_browser, average_for_device):
print("The average revenue for %s is %.2f" %(i,j))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add 2 blank lines after here.

Copy link
Contributor

@jonathancstroud jonathancstroud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for deleting the files. There are still some unresolved comments to address.

@jonathancstroud jonathancstroud self-assigned this Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants