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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pandas/io/orc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

**kwargs
Any additional kwargs are passed to pyarrow.

Expand Down