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

Pandas FutureWarning: Could not cast to int64 #1357

Closed
R-Palazzo opened this issue Apr 4, 2023 · 0 comments · Fixed by #1379
Closed

Pandas FutureWarning: Could not cast to int64 #1357

R-Palazzo opened this issue Apr 4, 2023 · 0 comments · Fixed by #1379
Assignees
Labels
internal The issue doesn't change the API or functionality
Milestone

Comments

@R-Palazzo
Copy link
Contributor

Problem Description

Running the sdv/tests with pytests raised the following pandas warning:

FutureWarning: Could not cast to int64, falling back to object. This behavior is deprecated. In a future version, when a dtype is passed to 'DataFrame', either all columns will be cast to that dtype, or a TypeError will be raised.

Expected behavior

We want to modify the code to no longer get this warning.

Additional context

Here is given the code lines in sdv that raised the warning. Because this list may be incomplete, it would be nice to check after the correction that the warning is not in the warning summary of pytests.

Lines to be modified:

/tests/unit/multi_table/test_hma.py:322
/tests/unit/multi_table/test_hma.py:279
/tests/unit/multi_table/test_hma.py:326
/tests/unit/multi_table/test_hma.py:332
/tests/unit/multi_table/test_hma.py:285
@R-Palazzo R-Palazzo added internal The issue doesn't change the API or functionality maintenance Tasks related to infrastructure & dependencies new Automatic label applied to new issues labels Apr 4, 2023
@npatki npatki changed the title Pandas warning 3 Pandas FutureWarning: Could not cast to int64 Apr 4, 2023
@npatki npatki removed maintenance Tasks related to infrastructure & dependencies new Automatic label applied to new issues labels Apr 4, 2023
@amontanez24 amontanez24 added this to the 1.1.0 milestone May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal The issue doesn't change the API or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants