We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug A clear and concise description of what the bug is.
You can follow the following snippet to reproduce the error:
import pandera as pa import pandera.extensions as extensions import pandas as pd from typing import Dict @extensions.register_check_method( statistics=["group_a", "group_b"], check_type="groupby", ) def groupby_check(dict_groups: Dict[str, pd.Series], *, group_a, group_b): return dict_groups[group_a].mean() > dict_groups[group_b].mean() data = pd.DataFrame( { "values": [20, 10, 1, 15], "groups": list("xxyy"), } ) schema = pa.DataFrameSchema( { "values": pa.Column( int, pa.Check.groupby_check(group_a="x", group_b="y", groupby="groups"), ), "groups": pa.Column(str), } ) schema.to_yaml("/tmp/schema.yml") serialized_schema = pa.DataFrameSchema.from_yaml("/tmp/schema.yml") serialized_schema.validate(data)
I would expect the dict_groups to be passed to the groupby_check function, but instead the entire series is passed without the groupby.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
A clear and concise description of what the bug is.
You can follow the following snippet to reproduce the error:
Code Sample, a copy-pastable example
Expected behavior
I would expect the dict_groups to be passed to the groupby_check function, but instead the entire series is passed without the groupby.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: