Skip to content

TYP: added explanation of the join methods within df.align #53101

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

Merged
merged 7 commits into from
May 9, 2023

Conversation

Antony-evm
Copy link
Contributor

Added type annotations of the join methods within df.align - (here)

from join : {{'outer', 'inner', 'left', 'right'}}, default 'outer'

To
join : {{'outer', 'inner', 'left', 'right'}}, default 'outer'
Type of alignment to be performed.

        left: use only keys from left frame, preserve key order.
        right: use only keys from right frame, preserve key order.
        outer: use union of keys from both frames, sort keys lexicographically.
        inner: use intersection of keys from both frames, preserve the order of the left keys.

@mroeschke
Copy link
Member

/preview

@mroeschke mroeschke added the Docs label May 5, 2023
@mroeschke mroeschke added this to the 2.1 milestone May 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

Website preview of this PR available at: https://pandas.pydata.org/preview/53101/

Antony-evm and others added 2 commits May 7, 2023 20:15
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
@Antony-evm
Copy link
Contributor Author

Im getting this error with the proposed changes and I fail to see how this could be caused by the documentation:
error libmamba Bad conversion of configurable 'remote_connect_timeout_secs' from source '~/.condarc' : yaml-cpp: error at line 14, column 30: bad conversion

Any ideas? Is it a common issue?

@mroeschke
Copy link
Member

Looks like theres a doc issue:

2023-05-08T16:12:06.8973871Z /home/runner/work/pandas/pandas/pandas/core/generic.py:docstring of pandas.core.generic.NDFrame.align:13: WARNING: Bullet list ends without a blank line; unexpected unindent.
2023-05-08T16:12:06.8974978Z /home/runner/work/pandas/pandas/pandas/core/generic.py:docstring of pandas.core.generic.NDFrame.align:13: WARNING: Bullet list ends without a blank line; unexpected unindent.

Also no need to worry about that warning

@Antony-evm
Copy link
Contributor Author

Antony-evm commented May 9, 2023

Looks like theres a doc issue:

2023-05-08T16:12:06.8973871Z /home/runner/work/pandas/pandas/pandas/core/generic.py:docstring of pandas.core.generic.NDFrame.align:13: WARNING: Bullet list ends without a blank line; unexpected unindent.
2023-05-08T16:12:06.8974978Z /home/runner/work/pandas/pandas/pandas/core/generic.py:docstring of pandas.core.generic.NDFrame.align:13: WARNING: Bullet list ends without a blank line; unexpected unindent.

Also no need to worry about that warning

Thank you for this - the last line of the list should have been indented apparently. Fixed it and it should be ready to close now. If you could point me to where to look in the logs next time, I'd appreciate it as I spent some time trying to find the error and couldn't find the above for the life of me.

PS: Im quite new to git/github. Apologies for closing/reopening - thought this action would merge the pull request to the main branch.

@Antony-evm Antony-evm closed this May 9, 2023
@Antony-evm Antony-evm reopened this May 9, 2023
@mroeschke mroeschke merged commit fd9fd7a into pandas-dev:main May 9, 2023
@mroeschke
Copy link
Member

Thanks @Antony-evm

Rylie-W pushed a commit to Rylie-W/pandas that referenced this pull request May 19, 2023
…v#53101)

* added description to join methods of alignment

* Update generic.py

* run ruff/black to fix type errors

* Update pandas/core/generic.py

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>

* update from - to * to follow join's doc guide

* Update generic.py

---------

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
…v#53101)

* added description to join methods of alignment

* Update generic.py

* run ruff/black to fix type errors

* Update pandas/core/generic.py

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>

* update from - to * to follow join's doc guide

* Update generic.py

---------

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: pd.DataFrame.align() join parameter values are insufficiently explained
2 participants