Skip to content

groupby complex attributes #1198

@tcurdt

Description

@tcurdt

I have a list of objects. These objects have a date attribute. I want to group by year.
Something along the lines of the following would be nice.

for year, posts in collections.post | groupby("date.year")

But it begs the question how to deal with transforms that need to happen before the grouping.
Is there a way to use groupby like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions