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

feat: remove warning while using pandas iloc in the test files #1625

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

quant12345
Copy link
Contributor

This PR removes the warning:

tests/unit/test_pandas/test_correlations.py::test_numeric_auto_equals_spearman
  /home/runner/work/ydata-profiling/ydata-profiling/tests/unit/test_pandas/test_correlations.py:69: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
    assert auto_result.iloc[0][1] == pytest.approx(spearman_result.iloc[0][1], 0.01)

tests/unit/test_pandas/test_correlations.py::test_categorical_auto_equals_equals_cramers
  /home/runner/work/ydata-profiling/ydata-profiling/tests/unit/test_pandas/test_correlations.py:83: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
    assert auto_result.iloc[0][1] == pytest.approx(cramers_result.iloc[0][1], 0.01)

@fabclmnt fabclmnt self-requested a review July 15, 2024 14:46
@fabclmnt fabclmnt changed the title In a future version pandas, integer keys will always be treated as labels feat: remove warning while using pandas iloc in the test files Jul 15, 2024
@fabclmnt fabclmnt merged commit e3a9f10 into ydataai:develop Jul 15, 2024
12 of 14 checks passed
@quant12345 quant12345 deleted the fix/iloc branch July 15, 2024 17:46
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 this pull request may close these issues.

2 participants