-
Notifications
You must be signed in to change notification settings - Fork 220
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
clib.conversion._to_numpy: Add tests for pandas.Series with pyarrow date32/date64 types #3610
base: main
Are you sure you want to change the base?
Conversation
e13b5d3
to
d504a04
Compare
…te32/date64 types
…rrow]' to 'datetime64[ms]'
d504a04
to
af30386
Compare
Ping @weiji14 for final reviews on the |
Maybe update the test here too to check explicitly for "datetime64[D]"/"datetim64[ms]" instead of just pygmt/pygmt/tests/test_clib_vectors_to_arrays.py Lines 89 to 100 in 9a12ae9
|
Actually I feel the test |
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.
Actually I feel the test
test_vectors_to_arrays_pyarrow_datetime
can be removed, since it's already covered by the newly added tests in this PR.
On second thought, maybe keep the test. we need to test that vectors_to_arrays
can handle mixed dtypes (and that test checks both date32/date64) from a pandas.DataFrame or nested list, whereas _to_numpy
is for single dtypes on a pandas.Series or single list.
Description of proposed changes
Add tests for panda.Series with pyarrow date32/date64 dtypes.
In PR #2845, we added the support of
date32[day][pyarrow]
anddate64[ms][pyarrow]
and mapped them tonp.datetime64
. This PR improves it and maps them to"datetime64[D]"
anddatetim64[ms]
respectively.After approval, I plan to cherry-pick changes in e13b5d3 into a separate PR so that we can have a changelog entry.