Skip to content
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

sanitize_dataframe utilizes deprecated Pandas convert_dtype param #3181

Closed
cdkini opened this issue Aug 30, 2023 · 1 comment · Fixed by #3191
Closed

sanitize_dataframe utilizes deprecated Pandas convert_dtype param #3181

cdkini opened this issue Aug 30, 2023 · 1 comment · Fixed by #3191
Assignees

Comments

@cdkini
Copy link

cdkini commented Aug 30, 2023

This particular utility function uses a deprecated Pandas codepath: https://github.com/altair-viz/altair/blob/ec13a671d53419f371b629d449f719240d1f1756/altair/utils/core.py#L410C1-L410C76

As this emits a FutureWarning and will eventually be removed, could it be replaced with the suggestion?

FutureWarning: the convert_dtype parameter is deprecated and will be removed in a future version.  Do ``ser.astype(object).apply()`` instead if you want ``convert_dtype=False``.

Versions: Altair 4.2.2 and Pandas 2.1.0
OS: Darwin 22.6.0

@cdkini cdkini changed the title sanitize_dataframe utilizes deprecated Pandas SeriesApply sanitize_dataframe utilizes deprecated Pandas convert_dtype param Aug 30, 2023
@binste
Copy link
Contributor

binste commented Aug 30, 2023

Thanks for reporting this @cdkini. Makes sense, I'll look into it.

For my own reference, it's deprecated since version 2.1 (search for convert_type)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants