-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Add pyarrow type equivalency table #50474
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor comments, but looks good.
doc/source/reference/arrays.rst
Outdated
===================================== ========================== =================== | ||
Pyarrow type pandas extension type Numpy type | ||
===================================== ========================== =================== | ||
``pd.ArroeDtype(pa.bool_())`` :class:`BooleanDtype` ``np.bool_`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``pd.ArroeDtype(pa.bool_())`` :class:`BooleanDtype` ``np.bool_`` | |
``pd.ArrowDtype(pa.bool_())`` :class:`BooleanDtype` ``np.bool_`` |
typo
doc/source/reference/arrays.rst
Outdated
===================================== ========================== =================== | ||
Pyarrow type pandas extension type Numpy type | ||
===================================== ========================== =================== | ||
``pd.ArroeDtype(pa.bool_())`` :class:`BooleanDtype` ``np.bool_`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think repeating pd.ArrowDtype
to wrap every arrow type in this column adds value? Since the column title is Pyarrow type
, feels like just using pa.bool_()
... is good enough. And maybe a note to comment on creating a pandas arrow type before or after the table could be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. I'll link to the pyarrow factory type functions and explain they need to be passed into pd.ArrowDtype
explicitly
doc/source/reference/arrays.rst
Outdated
The table below shows the equivalent pyarrow-backed (``pa``), pandas extension, and numpy (``np``) types that are recognized by pandas. | ||
|
||
===================================== ========================== =================== | ||
Pyarrow type pandas extension type Numpy type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pyarrow type pandas extension type Numpy type | |
PyArrow type pandas extension type NumPy type |
I think this is the preferred capitalization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @mroeschke
No description provided.