A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/47247 below:

check_like for assert_series_equal · Issue #47247 · pandas-dev/pandas · GitHub

Is your feature request related to a problem?

I wish assert_series_equal would contain the same check_like functionality as assert_frame_equal.

Describe the solution you'd like

The solution should be the same as assert_frame_equal.

API breaking implications

The change would be fully backward compatible (default value False).

Describe alternatives you've considered

I currently use assert_index_equal with check_order=False and use assert_series_equal with the reindexed Series.

Additional context
# the following should not raise an AssertionError:
assert_series_equal(
    pd.Series([1, 2, 3], index=["a", "b", "c"]),
    pd.Series([3, 2, 1], index=["c", "b", "a"]),
    check_like=True,
)

Note: If check_index is False then check_like must be False.

I'll create a PR in a bit.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4