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

Potential new checks to detect df size change: is_smaller, is_larger #18

Open
ZaxR opened this issue Jul 9, 2019 · 2 comments
Open
Labels
help wanted Extra attention is needed New Check

Comments

@ZaxR
Copy link
Owner

ZaxR commented Jul 9, 2019

In cases for functions are meant to filter out results, the user might not know the new size of the df, but may know that it should be smaller.

@ZaxR ZaxR added enhancement New feature or request New Check and removed enhancement New feature or request labels Jul 9, 2019
@ZaxR
Copy link
Owner Author

ZaxR commented Jul 19, 2019

This will require comparing the state of the original df to the output df. For example:

df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})

def sample_func(df):
    return df[df['a'].isin([2])]

In the above case, the original df had three rows, but the output df should have one row. The check would confirm the 3 > 1 for is_smaller

@ZaxR ZaxR added the help wanted Extra attention is needed label Jul 26, 2019
@wdhorton
Copy link

I can try to tackle this. I started looking at the BaseDecorator code, I guess my main question is: when we're decorating the function with this check, can we assume that the first arg passed is the original df? And if not, how do we tell which of the args we are supposed to treat as the original df?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed New Check
Projects
None yet
Development

No branches or pull requests

2 participants