Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 290 Bytes

r.rst

File metadata and controls

21 lines (14 loc) · 290 Bytes

Emulate R

aggregate

R:

aggregate(employees$salary, list(job = employees$job), mean)

agate:

jobs = employees.group_by('job')
aggregates = jobs.aggregate([
    ('mean', agate.Mean('salary'))
])