Skip to content

add std in calc #2

@bjornjorgensen

Description

@bjornjorgensen

in line [104]
'''
Create a pivot table that groups by Sex
and calculates the mean of Physics and Chemistry'''
pivot_table = df.pivot_table(index='Sex',
values=['Physics','Chemistry'],
aggfunc=[len, np.mean, np.std])
pivot_table

you are calculating std to so
'''
Create a pivot table that groups by Sex
and calculates the mean and standard deviation of Physics and Chemistry
'''

pivot_table = df.pivot_table(index='Sex',
values=['Physics','Chemistry'],
aggfunc=[len, np.mean, np.std])
pivot_table

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions