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

document the arguments in favor of 'set_columns' inplace method #3

Open
asmirnov69 opened this issue Mar 21, 2023 · 0 comments
Open
Assignees

Comments

@asmirnov69
Copy link
Contributor

asmirnov69 commented Mar 21, 2023

set_columns method is defined as aux way to set dataframe columns using list and avoid creation of method call glyph on pyjviz diagram. Such definition has problem with pyjanitor stated rule inplace methods should be avoided (need ref here).

The document needs to be created to address this contradiction. It also make sense to crossref with pyjanitor-devs/pyjanitor#76

@method_call.pass_through_method
@pf.register_dataframe_method
def set_columns(df: pd.DataFrame, columns) -> pd.DataFrame:
        df.columns = columns
        return df
@asmirnov69 asmirnov69 self-assigned this Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant