Skip to content

sort_index raises FutureWarning #86

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

Closed
tswast opened this issue Mar 21, 2022 · 4 comments
Closed

sort_index raises FutureWarning #86

tswast opened this issue Mar 21, 2022 · 4 comments
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@tswast
Copy link
Collaborator

tswast commented Mar 21, 2022

tests/compliance/date/test_date_compliance.py::TestMethods::test_value_counts[data_missing-False]
tests/compliance/date/test_date_compliance.py::TestMethods::test_value_counts[data_missing-False]
  /usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/site-packages/pandas/core/indexes/base.py:2177: FutureWarning: Comparison of NaT with datetime.date is deprecated in order to match the standard library behavior. In a future version these will be considered non-comparable.
    return self._engine.is_monotonic_increasing

-- Docs: https://docs.pytest.org/en/stable/warnings.html
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. label Mar 21, 2022
@tswast
Copy link
Collaborator Author

tswast commented Mar 21, 2022

Discovered in #84

@tswast tswast added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 21, 2022
@tswast tswast self-assigned this Mar 21, 2022
@tswast tswast added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 21, 2022
@tswast
Copy link
Collaborator Author

tswast commented Mar 21, 2022

Bumping down to P3, as I wasn't able to find a quick fix by looking at https://github.com/pandas-dev/pandas/blob/main/pandas/core/arrays/datetimelike.py and it doesn't seem to be affecting correctness.

Also, I see other extension arrays disallow sorting when NA values are present.

https://github.com/pandas-dev/pandas/blob/6033ed4b3383d874ee4a8a461724c0b8c2ca968d/pandas/core/arrays/masked.py#L862-L863

So this particular test might be one we want to disable, anyway?

@tswast tswast removed their assignment Mar 21, 2022
@tswast
Copy link
Collaborator Author

tswast commented Mar 23, 2022

Possibly fixed in latest pandas, as the warning does not appear with the prerelease dependencies installed.

@chalmerlowe
Copy link
Collaborator

This warning no longer appears in the compliance testing and all tests pass.
Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants