Skip to content
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

implement 'list to sorted dict ' method #24

Closed
sk-guritech opened this issue Apr 2, 2023 · 1 comment
Closed

implement 'list to sorted dict ' method #24

sk-guritech opened this issue Apr 2, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sk-guritech
Copy link
Owner

# Input
[
    {"name" : "alice", "age" : 25},
    {"name" : "bob", "age" : 30},
    {"name" : "charlie", "age" : 35},
    {"name" : "david", "age" : 30}
]


ExtList(input, key="age")  # key is FunctionType | property | str | Hashable

#Output
{
    25 : [{"name" : "alice", "age" : 25}],
    30 : [{"name" : "bob", "age" : 30}, {"name" : "david", "age" : 30}],
    35 : [{"name" : "charlie", "age" : 35}]
}
@sk-guritech sk-guritech self-assigned this Apr 2, 2023
@sk-guritech sk-guritech added the enhancement New feature or request label Apr 2, 2023
@sk-guritech
Copy link
Owner Author

method name is group_by_key

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

When branches are created from issues, their pull requests are automatically linked.

1 participant