Skip to content

DOC: document read_orc columns order behaviour #49709

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 4 commits into from
Nov 21, 2022

Conversation

markopacak
Copy link
Contributor

pandas/io/orc.py Outdated
@@ -47,6 +47,8 @@ def read_orc(
``file://localhost/path/to/table.orc``.
columns : list, default None
If not None, only these columns will be read from the file.
Output always follows the ordering of the file and not the columns list.
This mirrors the original behaviour of :func:`pyarrow.orc.OrcFile.read`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you show how this renders?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Please suggest any improvement.

Screenshot from 2022-11-16 12-45-46

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about adding ~ to the link, could you try that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think https://github.com/pandas-dev/pandas/pull/49709/files#r1024350615 should allow the read sphinx link should allow it to render & link to the pyarrow docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth opening another issue for adding links to all references to pyarrow (only in the docstring).

pandas.io.orc.to_orc is also missing external+pyarrow.

Additional keyword arguments passed to :func:`pyarrow.orc.write_table`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, could you open an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double-checked and they all seem to correctly link to external documentation.

E.g. param engine_kwargs for DataFrame.to_orc: it has a link to pyarrow, but in the source-code it doesn't have external+pyarrow in front.

So we should be good.

@mroeschke mroeschke added Docs IO Data IO issues that don't fit into a more specific label labels Nov 16, 2022
@mroeschke mroeschke added this to the 2.0 milestone Nov 21, 2022
@phofl phofl merged commit 9ee3325 into pandas-dev:main Nov 21, 2022
@phofl
Copy link
Member

phofl commented Nov 21, 2022

thx @markopacak

mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Ordering of columns is not preserved in pd.read_orc
3 participants