Python Homework on Health Data from Nick M

Hi guys, see attached for the code on the health data. Thanks!
Agreed that seems pretty baffling, I guess when I ran it it worked so I
didn't question it. I'd be happy to show you guys what I'm seeing at class
today.


On Mon, Aug 11, 2014 at 9:01 AM, Aaron Schumacher <notifications@github.com>
wrote:

> In 06-python/Health_Python_NickM.py:
>
> > +
> > +#Create list that sums health2 and health5
> > +health_2_5 = data.health2 + data.health5
> > +print health_2_5
> > +
> > +#Calculate average male and female age
> > +bygender = data.groupby('gender')
> > +bygender['age'].describe()
> > +
> > +#Collapse gender by average age
> > +collapsed = bygender.aggregate(np.mean)
> > +collapsed2x2 = collapsed.age
> > +print collapsed2x2
> > +
> > +#Write csv with sex and average age
> > +import csv
>
> Hmm - I'd be surprised if Spyder did any automagic imports; @justmarkham
> <https://github.com/justmarkham> do you know?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ajschumacher/gadsdc2/pull/85/files#r16050971>.
>