Skip to content

Cookbook text fix #8957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Cookbook text fix #8957

wants to merge 5 commits into from

Conversation

stevesimmons
Copy link
Contributor

Closes #8944

@shoyer
Copy link
Member

shoyer commented Dec 2, 2014

@stevesimmons Make a new branch off of master, then use git cherry-pick 1b0db93.

@jorisvandenbossche
Copy link
Member

@stevesimmons yep, good catch (size was only introduced recently for DataFrame, see #8847, this is the reason it was working before)

avg_weight = sum(x[x.size == 'S'].weight * 1.5)
avg_weight += sum(x[x.size == 'M'].weight * 1.25)
avg_weight += sum(x[x.size == 'L'].weight)
avg_weight = sum(x[x['size'] == 'S'].weight * 1.5)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use the same column access notation for weight as well, to be a bit consistent within one line.

@jorisvandenbossche jorisvandenbossche added this to the 0.15.2 milestone Dec 2, 2014
@jreback
Copy link
Contributor

jreback commented Dec 2, 2014

@stevesimmons need to rebase/squash this on master

@stevesimmons stevesimmons deleted the cookbook-text-fix branch December 3, 2014 00:20
@jreback
Copy link
Contributor

jreback commented Dec 3, 2014

@stevesimmons I guess you deleted this branch? want to resubmit?

@stevesimmons
Copy link
Contributor Author

Yes, i will redo that branch. I am still learning about git, making clean commits, rebasing branches against upstream head, and have made some mistakes along the way. e.g. i am still not clear if I should worry a push is x commits behind head.

On 3 December 2014 22:29:29 GMT+00:00, jreback [email protected] wrote:

@stevesimmons I guess you deleted this branch? want to resubmit?


Reply to this email directly or view it on GitHub:
#8957 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cookbook groupby apply example is failing
4 participants