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

Welcome page documentation code example problem - remove_column() doesn't exist #35

Closed
zbarry opened this issue Nov 2, 2018 · 4 comments
Labels
docfix Documentation fixes needed good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zbarry
Copy link
Collaborator

zbarry commented Nov 2, 2018

In:

df = (
    pd.DataFrame(...)
    .remove_column('column1')
    .dropna(subset=['column2', 'column3'])
    .rename_column('column2', 'unicorns')
    .rename_column('column3', 'dragons')
    .add_column('newcolumn', ['iterable', 'of', 'items'])
)

remove_column() is not [any longer?] a function. I guess this should be remove_columns(), instead. Note that the latter only takes list arguments apparently, instead of just a string in the case where you only want to remove one column. Might be useful to support both types of inputs.

@zbarry
Copy link
Collaborator Author

zbarry commented Nov 2, 2018

Just found this old reference to the non-plural spelling as well in the api.html page -

df = pd.DataFrame(...).remove_column(cols=['col1', ['col2']])

(Just actually starting to look into how to use your package, haha).

@ericmjl
Copy link
Member

ericmjl commented Nov 2, 2018

These are good catches! Docs are one of the hardest things to maintain haha. I am thinking of moving over to doctests, so that example usage and their associated tests are automatically shown for each function.

@zbarry
Copy link
Collaborator Author

zbarry commented Nov 2, 2018

Also: filter_on is called filter_column in the API page example.

@ericmjl
Copy link
Member

ericmjl commented Nov 3, 2018

Cool stuff, thanks for the catch, @zbarry. Would you be open to a documentation PR fix? The way to do so would be to first fork the repository, then create a branch off your fork, and PR into my master branch from your fork.

@ericmjl ericmjl added help wanted Extra attention is needed good first issue Good for newcomers docfix Documentation fixes needed labels Nov 3, 2018
@zbarry zbarry closed this as completed Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docfix Documentation fixes needed good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants