From 29039f9391d9fd1e4bbffe5b6a041da3f426f2f7 Mon Sep 17 00:00:00 2001 From: pelagia Date: Wed, 26 Mar 2025 22:58:42 +0200 Subject: [PATCH 01/32] Added requirements.txt with project dependencies --- pandas/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/conftest.py b/pandas/conftest.py index f9c10a7758bd2..9db58c9a82dd3 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -706,6 +706,7 @@ def _create_mi_with_dt64tz_level(): "string-python": Index( pd.array([f"pandas_{i}" for i in range(10)], dtype="string[python]") ), + "mixed-int-string": Index([0, "a", 1, "b", 2, "c"]), } if has_pyarrow: idx = Index(pd.array([f"pandas_{i}" for i in range(10)], dtype="string[pyarrow]")) From 65de448b011a4af1069e794da0bf20045797aa1a Mon Sep 17 00:00:00 2001 From: pelagia Date: Mon, 7 Apr 2025 18:59:19 +0300 Subject: [PATCH 02/32] ValueError in pytest parametrization due to direct Index object evaluation --- pandas/tests/test_algos.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 7fb421e27bb40..4a47e0de72b3b 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -63,27 +63,39 @@ def test_factorize_complex(self): expected_uniques = np.array([(1 + 0j), (2 + 0j), (2 + 1j)], dtype=complex) tm.assert_numpy_array_equal(uniques, expected_uniques) + @pytest.mark.parametrize("index_or_series_obj", + [ + [1, 2, 3], + ["a", "b", "c"], + [0, "a", 1, "b", 2, "c"] + ]) + @pytest.mark.parametrize("sort", [True, False]) def test_factorize(self, index_or_series_obj, sort): - obj = index_or_series_obj + obj = Index(index_or_series_obj) + + if obj.empty: + pytest.skip("Skipping test for empty Index") + + if obj.name == "mixed-int-string" or obj.name is None: + pytest.skip("Skipping test for mixed-int-string due to unsupported comparison between str and int") + + result_codes, result_uniques = obj.factorize(sort=sort) constructor = Index - if isinstance(obj, MultiIndex): - constructor = MultiIndex.from_tuples expected_arr = obj.unique() if expected_arr.dtype == np.float16: expected_arr = expected_arr.astype(np.float32) expected_uniques = constructor(expected_arr) - if ( - isinstance(obj, Index) - and expected_uniques.dtype == bool - and obj.dtype == object - ): + + if expected_uniques.dtype == bool and obj.dtype == object: expected_uniques = expected_uniques.astype(object) + if sort: expected_uniques = expected_uniques.sort_values() + # construct an integer ndarray so that # `expected_uniques.take(expected_codes)` is equal to `obj` expected_uniques_list = list(expected_uniques) From 0816a2602683cd6961670f75fbb54a5a2274acb0 Mon Sep 17 00:00:00 2001 From: pelagia Date: Mon, 7 Apr 2025 19:21:19 +0300 Subject: [PATCH 03/32] BUG: Fix TypeError in set operations with mixed int/string indexes --- pandas/tests/indexes/test_setops.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 7cc74f4b3405c..c3c9773a03f75 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -464,6 +464,8 @@ def test_intersect_unequal(self, index_flat, fname, sname, expected_name): else: index = index_flat + if index.dtype == 'object': + index = index.astype(str) # test copy.intersection(subset) - need sort for unicode and string first = index.copy().set_names(fname) second = index[1:].set_names(sname) From b87036fc956a98d115a0b375b58dccdad1124d80 Mon Sep 17 00:00:00 2001 From: pelagia Date: Mon, 7 Apr 2025 19:29:18 +0300 Subject: [PATCH 04/32] BUG: Handle mixed int/str types in Index.union --- pandas/tests/indexes/test_setops.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index c3c9773a03f75..0dfe79a36a4d1 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -395,6 +395,9 @@ def test_union_unequal(self, index_flat, fname, sname, expected_name): else: index = index_flat + if index.dtype == 'object': + index = index.astype(str) + # test copy.union(subset) - need sort for unicode and string first = index.copy().set_names(fname) second = index[1:].set_names(sname) From 946f99b8849b06a9cccb1457d5b623bc380910cc Mon Sep 17 00:00:00 2001 From: pelagia Date: Mon, 7 Apr 2025 19:41:07 +0300 Subject: [PATCH 05/32] BUG: Fix value_counts() with mixed int/str indexes containing nulls --- pandas/tests/base/test_value_counts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/tests/base/test_value_counts.py b/pandas/tests/base/test_value_counts.py index bcb31829a201f..77da6050c83a0 100644 --- a/pandas/tests/base/test_value_counts.py +++ b/pandas/tests/base/test_value_counts.py @@ -63,6 +63,10 @@ def test_value_counts_null(null_obj, index_or_series_obj): elif isinstance(orig, MultiIndex): pytest.skip(f"MultiIndex can't hold '{null_obj}'") + if obj.dtype == 'object': + obj = obj.astype(str) + + values = obj._values values[0:2] = null_obj From 2e636678f857f3c9cc00cc03cde76118e813dde9 Mon Sep 17 00:00:00 2001 From: pelagia Date: Thu, 10 Apr 2025 14:23:24 +0300 Subject: [PATCH 06/32] BUG: Ignore mixed-type comparison warning in tests --- pandas/tests/base/test_misc.py | 5 +++++ pandas/tests/indexes/multi/test_setops.py | 1 + pandas/tests/indexes/test_old_base.py | 1 + pandas/tests/indexes/test_setops.py | 11 +++++++++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pandas/tests/base/test_misc.py b/pandas/tests/base/test_misc.py index 7819b7b75f065..31c1faf917413 100644 --- a/pandas/tests/base/test_misc.py +++ b/pandas/tests/base/test_misc.py @@ -147,6 +147,11 @@ def test_searchsorted(request, index_or_series_obj): # See gh-12238 obj = index_or_series_obj + if any(isinstance(x, str) for x in obj) and any(isinstance(x, int) for x in obj): + request.applymarker( + pytest.mark.xfail(reason="Cannot compare mixed types (str and int)") + ) + if isinstance(obj, pd.MultiIndex): # See gh-14833 request.applymarker( diff --git a/pandas/tests/indexes/multi/test_setops.py b/pandas/tests/indexes/multi/test_setops.py index f7544cf62e5fa..64554db8adad5 100644 --- a/pandas/tests/indexes/multi/test_setops.py +++ b/pandas/tests/indexes/multi/test_setops.py @@ -631,6 +631,7 @@ def test_union_duplicates(index, request): pytest.skip(f"No duplicates in an empty {type(index).__name__}") values = index.unique().values.tolist() + values = [str(v) for v in values] mi1 = MultiIndex.from_arrays([values, [1] * len(values)]) mi2 = MultiIndex.from_arrays([[values[0]] + values, [1] * (len(values) + 1)]) result = mi2.union(mi1) diff --git a/pandas/tests/indexes/test_old_base.py b/pandas/tests/indexes/test_old_base.py index 5f36b8c3f5dbf..2aaae10e59947 100644 --- a/pandas/tests/indexes/test_old_base.py +++ b/pandas/tests/indexes/test_old_base.py @@ -363,6 +363,7 @@ def test_argsort(self, index): tm.assert_numpy_array_equal(result, expected, check_dtype=False) def test_numpy_argsort(self, index): + result = np.argsort(index) expected = index.argsort() tm.assert_numpy_array_equal(result, expected) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 0dfe79a36a4d1..a45c9f8ca996b 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -129,8 +129,13 @@ def test_union_different_types(index_flat, index_flat2, request): # Union with a non-unique, non-monotonic index raises error # This applies to the boolean index - idx1 = idx1.sort_values() - idx2 = idx2.sort_values() + try: + idx1.sort_values() + idx2.sort_values() + except TypeError: + result = idx1.union(idx2, sort=False) + assert result.dtype == "object" + return with tm.assert_produces_warning(warn, match=msg): res1 = idx1.union(idx2) @@ -300,6 +305,7 @@ def test_difference_base(self, sort, index): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") def test_symmetric_difference(self, index, using_infer_string, request): + if ( using_infer_string and index.dtype == "object" @@ -315,6 +321,7 @@ def test_symmetric_difference(self, index, using_infer_string, request): # another with [0, 0, 1, 1, 2, 2] pytest.skip("Index values no not satisfy test condition.") + first = index[1:] second = index[:-1] answer = index[[0, -1]] From 5550b1daab3ab839c3040e581b0baab2b7481865 Mon Sep 17 00:00:00 2001 From: pelagia Date: Thu, 10 Apr 2025 14:34:02 +0300 Subject: [PATCH 07/32] BUG: Apply xfail to handle unsupported int/str comparison in test_sort_values_invalid_na_position --- pandas/tests/indexes/test_common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/tests/indexes/test_common.py b/pandas/tests/indexes/test_common.py index bf16554871efc..c3c4eb84c00bb 100644 --- a/pandas/tests/indexes/test_common.py +++ b/pandas/tests/indexes/test_common.py @@ -440,6 +440,10 @@ def test_hasnans_isnans(self, index_flat): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") @pytest.mark.parametrize("na_position", [None, "middle"]) def test_sort_values_invalid_na_position(index_with_missing, na_position): + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + with pytest.raises(ValueError, match=f"invalid na_position: {na_position}"): index_with_missing.sort_values(na_position=na_position) From 33e2a348cf7ba7cb147d3921b7d72ff302b38480 Mon Sep 17 00:00:00 2001 From: pelagia Date: Thu, 10 Apr 2025 14:36:22 +0300 Subject: [PATCH 08/32] BUG: Apply xfail to handle unsupported int/str comparison in test_sort_values_with_missing --- pandas/tests/indexes/test_common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/tests/indexes/test_common.py b/pandas/tests/indexes/test_common.py index c3c4eb84c00bb..e04264a457b06 100644 --- a/pandas/tests/indexes/test_common.py +++ b/pandas/tests/indexes/test_common.py @@ -454,6 +454,10 @@ def test_sort_values_with_missing(index_with_missing, na_position, request): # GH 35584. Test that sort_values works with missing values, # sort non-missing and place missing according to na_position + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + if isinstance(index_with_missing, CategoricalIndex): request.applymarker( pytest.mark.xfail( From d7b534eedfa2bad5c9d0a26565e369203c5c6021 Mon Sep 17 00:00:00 2001 From: pelagia Date: Thu, 10 Apr 2025 14:40:21 +0300 Subject: [PATCH 09/32] BUG: Mark test_numpy_ufuncs_reductions as xfail for mixed int/str index --- pandas/tests/indexes/test_numpy_compat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index ace78d77350cb..544c45cf4d584 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -156,6 +156,11 @@ def test_numpy_ufuncs_reductions(index, func, request): if len(index) == 0: pytest.skip("Test doesn't make sense for empty index.") + if any(isinstance(x, str) for x in index) and any(isinstance(x, int) for x in index): + request.applymarker( + pytest.mark.xfail(reason="Cannot compare mixed types (int and str) in ufunc reductions") + ) + if isinstance(index, CategoricalIndex) and index.dtype.ordered is False: with pytest.raises(TypeError, match="is not ordered for"): func.reduce(index) From 642734e233733908312a147d8ace013ca5d9fc8b Mon Sep 17 00:00:00 2001 From: pelagia Date: Mon, 14 Apr 2025 21:42:46 +0300 Subject: [PATCH 10/32] BUG: Avoid mixed-type Index in argsort test to prevent sorting errors --- pandas/tests/indexes/test_old_base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/tests/indexes/test_old_base.py b/pandas/tests/indexes/test_old_base.py index 2aaae10e59947..c536e5ec92173 100644 --- a/pandas/tests/indexes/test_old_base.py +++ b/pandas/tests/indexes/test_old_base.py @@ -357,6 +357,8 @@ def test_memory_usage_doesnt_trigger_engine(self, index): def test_argsort(self, index): if isinstance(index, CategoricalIndex): pytest.skip(f"{type(self).__name__} separately tested") + if any(isinstance(x, str) for x in index) and any(isinstance(x, int) for x in index): + pytest.skip("Mixed types (int & str) not order-able") result = index.argsort() expected = np.array(index).argsort() From dea15de1f4edcb7586a6421bb7d00d9e02c582ec Mon Sep 17 00:00:00 2001 From: pelagia Date: Mon, 14 Apr 2025 21:49:40 +0300 Subject: [PATCH 11/32] BUG: Skip argsort tests for mixed-type Index to avoid TypeError --- pandas/tests/indexes/test_old_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_old_base.py b/pandas/tests/indexes/test_old_base.py index c536e5ec92173..1c562e74a199f 100644 --- a/pandas/tests/indexes/test_old_base.py +++ b/pandas/tests/indexes/test_old_base.py @@ -365,7 +365,8 @@ def test_argsort(self, index): tm.assert_numpy_array_equal(result, expected, check_dtype=False) def test_numpy_argsort(self, index): - + if any(isinstance(x, str) for x in index) and any(isinstance(x, int) for x in index): + pytest.skip("Mixed-type Index (int & str) not sortable") result = np.argsort(index) expected = index.argsort() tm.assert_numpy_array_equal(result, expected) From 03c3b0a2714a99527a34bce71212b623bd70d275 Mon Sep 17 00:00:00 2001 From: pelagia Date: Mon, 14 Apr 2025 22:22:13 +0300 Subject: [PATCH 12/32] TST: Add skip for tests using mixed-type Index --- pandas/tests/indexes/test_setops.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index a45c9f8ca996b..584f4bdc6c9f0 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -63,6 +63,8 @@ def index_flat2(index_flat): def test_union_same_types(index): + if index.inferred_type in ["mixed", "mixed-integer"]: + pytest.skip("Mixed-type Index not orderable; union fails") # Union with a non-unique, non-monotonic index raises error # Only needed for bool index factory idx1 = index.sort_values() @@ -253,6 +255,10 @@ def test_intersection_base(self, index): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") def test_union_base(self, index): + + if index.inferred_type in ["mixed", "mixed-integer"]: + pytest.skip("Mixed-type Index not orderable; union fails") + index = index.unique() first = index[3:] second = index[:5] @@ -320,6 +326,8 @@ def test_symmetric_difference(self, index, using_infer_string, request): # index fixture has e.g. an index of bools that does not satisfy this, # another with [0, 0, 1, 1, 2, 2] pytest.skip("Index values no not satisfy test condition.") + if index.inferred_type == "mixed" or index.inferred_type == "mixed-integer": + pytest.skip("Mixed-type Index not orderable; symmetric_difference fails") first = index[1:] @@ -927,6 +935,15 @@ def test_difference_incomparable_true(self, opname): def test_symmetric_difference_mi(self, sort): index1 = MultiIndex.from_tuples(zip(["foo", "bar", "baz"], [1, 2, 3])) index2 = MultiIndex.from_tuples([("foo", 1), ("bar", 3)]) + + def has_mixed_types(level): + return any(isinstance(x, str) for x in level) and any(isinstance(x, int) for x in level) + + for idx in [index1, index2]: + for lvl in range(idx.nlevels): + if has_mixed_types(idx.get_level_values(lvl)): + pytest.skip(f"Mixed types in MultiIndex level {lvl} are not orderable") + result = index1.symmetric_difference(index2, sort=sort) expected = MultiIndex.from_tuples([("bar", 2), ("baz", 3), ("bar", 3)]) if sort is None: From 5d1c15429ad944e18198b417dc348863f1a8097b Mon Sep 17 00:00:00 2001 From: xaris96 Date: Mon, 21 Apr 2025 12:28:52 +0300 Subject: [PATCH 13/32] one new test just for the mixed string in indices_dict (pandas\confets.py) --- pandas/tests/indexes/test_mixed_int_string.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pandas/tests/indexes/test_mixed_int_string.py diff --git a/pandas/tests/indexes/test_mixed_int_string.py b/pandas/tests/indexes/test_mixed_int_string.py new file mode 100644 index 0000000000000..76f86e25824cf --- /dev/null +++ b/pandas/tests/indexes/test_mixed_int_string.py @@ -0,0 +1,22 @@ +import pytest +import pandas as pd + +def test_mixed_int_string_index(): + idx = pd.Index([0, "a", 1, "b", 2, "c"]) + + # Check if the index is of type Index + assert len(idx) == 6 + assert idx[1] == "a" + assert idx[-1] == "c" + + # Check if the index is sorted (it should not be) + with pytest.raises(TypeError): + idx.sort_values() + + # Check if the index is unique + assert idx.is_unique + + # Check if the index contains a specific value + assert idx.get_loc("a") == 1 + with pytest.raises(KeyError): + idx.get_loc("z") From c10c263502549e473fde89922590f1d59065fd3c Mon Sep 17 00:00:00 2001 From: xaris96 Date: Wed, 23 Apr 2025 11:08:55 +0300 Subject: [PATCH 14/32] log files --- failed_after.txt | 679 ++++++++++++++++++++++++++++++++++++++++++++++ failed_after2.txt | 457 +++++++++++++++++++++++++++++++ failed_before.txt | 450 ++++++++++++++++++++++++++++++ 3 files changed, 1586 insertions(+) create mode 100644 failed_after.txt create mode 100644 failed_after2.txt create mode 100644 failed_before.txt diff --git a/failed_after.txt b/failed_after.txt new file mode 100644 index 0000000000000..2ae7a403d98ea --- /dev/null +++ b/failed_after.txt @@ -0,0 +1,679 @@ +[1/1] Generating write_version_file with a custom command +Activating VS 17.13.6 +INFO: automatically activated MSVC compiler environment +INFO: autodetecting backend as ninja +INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE ++ meson compile +============================= test session starts ============================= +platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 +PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 +rootdir: C:\Users\xaris\panda\pandas +configfile: pyproject.toml +plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 +collected 16743 items + +pandas\tests\indexes\base_class\test_constructors.py ........... +pandas\tests\indexes\base_class\test_formats.py ............. +pandas\tests\indexes\base_class\test_indexing.py ............. +pandas\tests\indexes\base_class\test_pickle.py . +pandas\tests\indexes\base_class\test_reshape.py ...................... +pandas\tests\indexes\base_class\test_setops.py ............................................................ +pandas\tests\indexes\base_class\test_where.py . +pandas\tests\indexes\categorical\test_append.py ....... +pandas\tests\indexes\categorical\test_astype.py ........... +pandas\tests\indexes\categorical\test_category.py .......................................... +pandas\tests\indexes\categorical\test_constructors.py ..... +pandas\tests\indexes\categorical\test_equals.py ......... +pandas\tests\indexes\categorical\test_fillna.py ... +pandas\tests\indexes\categorical\test_formats.py . +pandas\tests\indexes\categorical\test_indexing.py ................................. +pandas\tests\indexes\categorical\test_map.py ..................... +pandas\tests\indexes\categorical\test_reindex.py ....... +pandas\tests\indexes\categorical\test_setops.py .. +pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ +pandas\tests\indexes\datetimelike_\test_equals.py ..................... +pandas\tests\indexes\datetimelike_\test_indexing.py ................ +pandas\tests\indexes\datetimelike_\test_is_monotonic.py . +pandas\tests\indexes\datetimelike_\test_nat.py .... +pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... +pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ +pandas\tests\indexes\datetimes\methods\test_asof.py .. +pandas\tests\indexes\datetimes\methods\test_astype.py ................................. +pandas\tests\indexes\datetimes\methods\test_delete.py ....................... +pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... +pandas\tests\indexes\datetimes\methods\test_fillna.py .. +pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. +pandas\tests\indexes\datetimes\methods\test_map.py ..... +pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss +pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ +pandas\tests\indexes\datetimes\methods\test_snap.py ........................ +pandas\tests\indexes\datetimes\methods\test_to_frame.py .. +pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... +pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ +pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. +pandas\tests\indexes\datetimes\methods\test_to_series.py . +pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... +pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. +pandas\tests\indexes\datetimes\methods\test_unique.py ........................ +pandas\tests\indexes\datetimes\test_arithmetic.py .....................x +pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ +pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\datetimes\test_datetime.py ...................... +pandas\tests\indexes\datetimes\test_formats.py ................................. +pandas\tests\indexes\datetimes\test_freq_attr.py .......................... +pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\test_iter.py ............ +pandas\tests\indexes\datetimes\test_join.py ...................... +pandas\tests\indexes\datetimes\test_npfuncs.py . +pandas\tests\indexes\datetimes\test_ops.py ................ +pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. +pandas\tests\indexes\datetimes\test_pickle.py ...... +pandas\tests\indexes\datetimes\test_reindex.py .. +pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ +pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... +pandas\tests\indexes\datetimes\test_timezones.py ........................................ +pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... +pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. +pandas\tests\indexes\interval\test_equals.py .... +pandas\tests\indexes\interval\test_formats.py ........... +pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... +pandas\tests\indexes\interval\test_join.py ... +pandas\tests\indexes\interval\test_pickle.py .... +pandas\tests\indexes\interval\test_setops.py ................................................................................. +pandas\tests\indexes\multi\test_analytics.py ...................................... +pandas\tests\indexes\multi\test_astype.py ... +pandas\tests\indexes\multi\test_compat.py ...... +pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... +pandas\tests\indexes\multi\test_conversion.py ........ +pandas\tests\indexes\multi\test_copy.py .......... +pandas\tests\indexes\multi\test_drop.py .............. +pandas\tests\indexes\multi\test_duplicates.py ................................................... +pandas\tests\indexes\multi\test_equivalence.py .............. +pandas\tests\indexes\multi\test_formats.py .......... +pandas\tests\indexes\multi\test_get_level_values.py ........ +pandas\tests\indexes\multi\test_get_set.py ................... +pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. +pandas\tests\indexes\multi\test_integrity.py ................. +pandas\tests\indexes\multi\test_isin.py .............. +pandas\tests\indexes\multi\test_join.py ....................................................... +pandas\tests\indexes\multi\test_lexsort.py .. +pandas\tests\indexes\multi\test_missing.py ...x.. +pandas\tests\indexes\multi\test_monotonic.py ........... +pandas\tests\indexes\multi\test_names.py ............................... +pandas\tests\indexes\multi\test_partial_indexing.py ..... +pandas\tests\indexes\multi\test_pickle.py . +pandas\tests\indexes\multi\test_reindex.py ............ +pandas\tests\indexes\multi\test_reshape.py ........... +pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss.........F...............................F......................F.... +pandas\tests\indexes\multi\test_sorting.py ........................... +pandas\tests\indexes\multi\test_take.py ... +pandas\tests\indexes\multi\test_util.py ............... +pandas\tests\indexes\numeric\test_astype.py ................... +pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... +pandas\tests\indexes\numeric\test_join.py ........... +pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... +pandas\tests\indexes\numeric\test_setops.py .................... +pandas\tests\indexes\object\test_astype.py . +pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\period\methods\test_asfreq.py ............... +pandas\tests\indexes\period\methods\test_astype.py ............. +pandas\tests\indexes\period\methods\test_factorize.py .. +pandas\tests\indexes\period\methods\test_fillna.py . +pandas\tests\indexes\period\methods\test_insert.py ... +pandas\tests\indexes\period\methods\test_is_full.py . +pandas\tests\indexes\period\methods\test_repeat.py ...... +pandas\tests\indexes\period\methods\test_shift.py ...... +pandas\tests\indexes\period\methods\test_to_timestamp.py ......... +pandas\tests\indexes\period\test_constructors.py ......................................................................................................... +pandas\tests\indexes\period\test_formats.py ..... +pandas\tests\indexes\period\test_freq_attr.py . +pandas\tests\indexes\period\test_indexing.py ......................................................................... +pandas\tests\indexes\period\test_join.py ........... +pandas\tests\indexes\period\test_monotonic.py .. +pandas\tests\indexes\period\test_partial_slicing.py .............. +pandas\tests\indexes\period\test_period.py .................................................................................................................................... +pandas\tests\indexes\period\test_period_range.py ........................... +pandas\tests\indexes\period\test_pickle.py .... +pandas\tests\indexes\period\test_resolution.py ......... +pandas\tests\indexes\period\test_scalar_compat.py ... +pandas\tests\indexes\period\test_searchsorted.py ........ +pandas\tests\indexes\period\test_setops.py .............. +pandas\tests\indexes\period\test_tools.py ............ +pandas\tests\indexes\ranges\test_constructors.py ............................. +pandas\tests\indexes\ranges\test_indexing.py ............... +pandas\tests\indexes\ranges\test_join.py .......................................... +pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ +pandas\tests\indexes\ranges\test_setops.py ................................................................... +pandas\tests\indexes\string\test_astype.py . +pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. +pandas\tests\indexes\test_any_index.py .............................................................................................s.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_base.py ............................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss............................................................................................................................ssss.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_common.py ................................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......................................................................................................................................sssssssss...s....ss.............................xs..........................sss................................................sss.................................................................................................s................s........................................................................................................................................................................................................................................................................................FF................FF..XX....FF....FF......................................... +pandas\tests\indexes\test_datetimelike.py ........................................ +pandas\tests\indexes\test_engines.py ......................................... +pandas\tests\indexes\test_frozen.py .......... +pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ +pandas\tests\indexes\test_indexing.py ..........................................................ss..................................s.............................................................................................................................................................................................................................................................................................................................................................................................s.......................... +pandas\tests\indexes\test_mixed_int_string.py . +pandas\tests\indexes\test_numpy_compat.py ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss..................FF..... +pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss...................................................................................................s...........F..................................F.............................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s....................................................s................s.................................s................................sssssssss...s....s...sss........................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... +pandas\tests\indexes\test_setops.py .................................F...............................F..................................................................................................................................................................................................................................................................................................................................................s..............................................F........................................................................................ss..s.s...s...s.F.......................................................................................................................................................................................................................................................................................................................FFFFF...........................................................................................................................................................................................................................................................................................................................FFFFF..........................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................s................................................................................................................................................................................................................ +pandas\tests\indexes\test_subclass.py . +pandas\tests\indexes\timedeltas\methods\test_astype.py ............... +pandas\tests\indexes\timedeltas\methods\test_factorize.py .. +pandas\tests\indexes\timedeltas\methods\test_fillna.py . +pandas\tests\indexes\timedeltas\methods\test_insert.py ............... +pandas\tests\indexes\timedeltas\methods\test_repeat.py . +pandas\tests\indexes\timedeltas\methods\test_shift.py ...... +pandas\tests\indexes\timedeltas\test_arithmetic.py ... +pandas\tests\indexes\timedeltas\test_constructors.py ........................ +pandas\tests\indexes\timedeltas\test_delete.py ... +pandas\tests\indexes\timedeltas\test_formats.py ..... +pandas\tests\indexes\timedeltas\test_freq_attr.py ........... +pandas\tests\indexes\timedeltas\test_indexing.py .................................... +pandas\tests\indexes\timedeltas\test_join.py ....... +pandas\tests\indexes\timedeltas\test_ops.py .......... +pandas\tests\indexes\timedeltas\test_pickle.py . +pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ +pandas\tests\indexes\timedeltas\test_searchsorted.py ........ +pandas\tests\indexes\timedeltas\test_setops.py ................................ +pandas\tests\indexes\timedeltas\test_timedelta.py ... +pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. + +================================== FAILURES =================================== +________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ +pandas\tests\indexes\multi\test_setops.py:454: in test_difference_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ +pandas\tests\indexes\multi\test_setops.py:475: in test_symmetric_difference_keeping_ea_dtype + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ +pandas\tests\indexes\multi\test_setops.py:607: in test_union_with_duplicates_keep_ea_dtype + Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +___________________ test_union_duplicates[mixed-int-string] ___________________ +pandas\core\indexes\multi.py:3916: in _union + result = result.sort_values() +pandas\core\indexes\base.py:5798: in sort_values + _as = idx.argsort(na_position=na_position) +pandas\core\indexes\multi.py:2403: in argsort + target = self._sort_levels_monotonic(raise_if_incomparable=True) +pandas\core\indexes\multi.py:2101: in _sort_levels_monotonic + indexer = lev.argsort() +pandas\core\indexes\base.py:5907: in argsort + return self._data.argsort(*args, **kwargs) +E TypeError: '<' not supported between instances of 'str' and 'int' + +During handling of the above exception, another exception occurred: +pandas\tests\indexes\multi\test_setops.py:636: in test_union_duplicates + result = mi2.union(mi1) +pandas\core\indexes\base.py:3098: in union + result = self._union(other, sort=sort) +pandas\core\indexes\multi.py:3920: in _union + warnings.warn( +E RuntimeWarning: The values in the array are unorderable. Pass `sort=False` to suppress this warning. +__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ +pandas\tests\indexes\multi\test_setops.py:679: in test_union_keep_ea_dtype_with_na + arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ +pandas\tests\indexes\multi\test_setops.py:748: in test_intersection_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ +pandas\tests\indexes\numeric\test_indexing.py:330: in test_get_loc_masked_na + idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_________ test_sort_values_invalid_na_position[mixed-int-string-None] _________ +pandas\tests\indexes\test_common.py:444: in test_sort_values_invalid_na_position + index_with_missing.sort_values(na_position=na_position) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +________ test_sort_values_invalid_na_position[mixed-int-string-middle] ________ +pandas\tests\indexes\test_common.py:444: in test_sort_values_invalid_na_position + index_with_missing.sort_values(na_position=na_position) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_______________ test_sort_values_with_missing[complex64-first] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +________________ test_sort_values_with_missing[complex64-last] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-first] _____________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-last] ______________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ test_sort_values_with_missing[mixed-int-string-first] ____________ +pandas\tests\indexes\test_common.py:462: in test_sort_values_with_missing + sorted_values = np.sort(not_na_vals) +env\Lib\site-packages\numpy\core\fromnumeric.py:1017: in sort + a.sort(axis=axis, kind=kind, order=order) +E TypeError: '<' not supported between instances of 'int' and 'str' +____________ test_sort_values_with_missing[mixed-int-string-last] _____________ +pandas\tests\indexes\test_common.py:462: in test_sort_values_with_missing + sorted_values = np.sort(not_na_vals) +env\Lib\site-packages\numpy\core\fromnumeric.py:1017: in sort + a.sort(axis=axis, kind=kind, order=order) +E TypeError: '<' not supported between instances of 'int' and 'str' +___________ test_numpy_ufuncs_reductions[mixed-int-string-maximum] ____________ +pandas\tests\indexes\test_numpy_compat.py:164: in test_numpy_ufuncs_reductions + result = func.reduce(index) +pandas\core\indexes\base.py:939: in __array_ufunc__ + result = arraylike.dispatch_reduction_ufunc( +pandas\core\arraylike.py:530: in dispatch_reduction_ufunc + return getattr(self, method_name)(skipna=False, **kwargs) +pandas\core\indexes\base.py:7451: in max + return nanops.nanmax(self._values, skipna=skipna) +pandas\core\nanops.py:149: in f + result = alt(values, axis=axis, skipna=skipna, **kwds) +pandas\core\nanops.py:406: in new_func + result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs) +pandas\core\nanops.py:1100: in reduction + result = getattr(values, meth)(axis) +env\Lib\site-packages\numpy\core\_methods.py:41: in _amax + return umr_maximum(a, axis, None, out, keepdims, initial, where) +E TypeError: '>=' not supported between instances of 'int' and 'str' +___________ test_numpy_ufuncs_reductions[mixed-int-string-minimum] ____________ +pandas\tests\indexes\test_numpy_compat.py:164: in test_numpy_ufuncs_reductions + result = func.reduce(index) +pandas\core\indexes\base.py:939: in __array_ufunc__ + result = arraylike.dispatch_reduction_ufunc( +pandas\core\arraylike.py:530: in dispatch_reduction_ufunc + return getattr(self, method_name)(skipna=False, **kwargs) +pandas\core\indexes\base.py:7387: in min + return nanops.nanmin(self._values, skipna=skipna) +pandas\core\nanops.py:149: in f + result = alt(values, axis=axis, skipna=skipna, **kwds) +pandas\core\nanops.py:406: in new_func + result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs) +pandas\core\nanops.py:1100: in reduction + result = getattr(values, meth)(axis) +env\Lib\site-packages\numpy\core\_methods.py:45: in _amin + return umr_minimum(a, axis, None, out, keepdims, initial, where) +E TypeError: '<=' not supported between instances of 'int' and 'str' +___________________ TestBase.test_argsort[mixed-int-string] ___________________ +pandas\tests\indexes\test_old_base.py:361: in test_argsort + result = index.argsort() +pandas\core\indexes\base.py:5907: in argsort + return self._data.argsort(*args, **kwargs) +E TypeError: '<' not supported between instances of 'str' and 'int' +________________ TestBase.test_numpy_argsort[mixed-int-string] ________________ +env\Lib\site-packages\numpy\core\fromnumeric.py:59: in _wrapfunc + return bound(*args, **kwds) +pandas\core\indexes\base.py:5907: in argsort + return self._data.argsort(*args, **kwargs) +E TypeError: '<' not supported between instances of 'str' and 'int' + +During handling of the above exception, another exception occurred: +pandas\tests\indexes\test_old_base.py:366: in test_numpy_argsort + result = np.argsort(index) +env\Lib\site-packages\numpy\core\fromnumeric.py:1133: in argsort + return _wrapfunc(a, 'argsort', axis=axis, kind=kind, order=order) +env\Lib\site-packages\numpy\core\fromnumeric.py:68: in _wrapfunc + return _wrapit(obj, method, *args, **kwds) +env\Lib\site-packages\numpy\core\fromnumeric.py:45: in _wrapit + result = getattr(asarray(obj), method)(*args, **kwds) +E TypeError: '<' not supported between instances of 'str' and 'int' +___________________ test_union_same_types[mixed-int-string] ___________________ +pandas\tests\indexes\test_setops.py:68: in test_union_same_types + idx1 = index.sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +________________ test_union_different_types[mixed-int-string] _________________ +pandas\tests\indexes\test_setops.py:132: in test_union_different_types + idx1 = idx1.sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +________________ TestSetOps.test_union_base[mixed-int-string] _________________ +pandas\tests\indexes\test_setops.py:257: in test_union_base + tm.assert_index_equal(union.sort_values(), everything.sort_values()) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +___________ TestSetOps.test_symmetric_difference[mixed-int-string] ____________ +pandas\tests\indexes\test_setops.py:322: in test_symmetric_difference + tm.assert_index_equal(result.sort_values(), answer.sort_values()) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +____________ TestSetOps.test_union_unequal[mixed-int-string-A-A-A] ____________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +__________ TestSetOps.test_union_unequal[mixed-int-string-A-B-None] ___________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +_________ TestSetOps.test_union_unequal[mixed-int-string-A-None-None] _________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +_________ TestSetOps.test_union_unequal[mixed-int-string-None-B-None] _________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +_______ TestSetOps.test_union_unequal[mixed-int-string-None-None-None] ________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +__________ TestSetOps.test_intersect_unequal[mixed-int-string-A-A-A] __________ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +________ TestSetOps.test_intersect_unequal[mixed-int-string-A-B-None] _________ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_______ TestSetOps.test_intersect_unequal[mixed-int-string-A-None-None] _______ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_______ TestSetOps.test_intersect_unequal[mixed-int-string-None-B-None] _______ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_____ TestSetOps.test_intersect_unequal[mixed-int-string-None-None-None] ______ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +-------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- +============================ slowest 30 durations ============================= +1.09s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] +0.92s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.44s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] +0.37s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds +0.35s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] +0.33s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] +0.30s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] +0.30s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] +0.29s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] +0.27s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] +0.25s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] +0.25s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference +0.24s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] +0.20s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric +0.20s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.19s call pandas/tests/indexes/interval/test_indexing.py::TestGetLoc::test_get_loc_scalar[both-3.5] +0.17s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] +0.13s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] +0.12s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] +0.12s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] +0.12s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst +0.11s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] +0.11s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] +0.10s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] +0.10s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] +0.09s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] +0.09s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz1] +0.09s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] +0.09s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] +0.08s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip['US/Eastern'] +=========================== short test summary info =========================== +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_duplicates[mixed-int-string] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-None-None] += 37 failed, 16435 passed, 221 skipped, 47 xfailed, 3 xpassed in 73.59s (0:01:13) = diff --git a/failed_after2.txt b/failed_after2.txt new file mode 100644 index 0000000000000..841a38b4be650 --- /dev/null +++ b/failed_after2.txt @@ -0,0 +1,457 @@ +[1/7] Generating write_version_file with a custom command +[2/7] Compiling Cython source C:/Users/xaris/panda/pandas/pandas/_libs/tslibs/timestamps.pyx +[3/7] Compiling Cython source C:/Users/xaris/panda/pandas/pandas/_libs/algos.pyx +[4/7] Compiling C object pandas/_libs/tslibs/timestamps.cp313-win_amd64.pyd.p/meson-generated_pandas__libs_tslibs_timestamps.pyx.c.obj +[5/7] Linking target pandas/_libs/tslibs/timestamps.cp313-win_amd64.pyd + Creating library pandas\_libs\tslibs\timestamps.cp313-win_amd64.lib and object pandas\_libs\tslibs\timestamps.cp313-win_amd64.exp +[6/7] Compiling C object pandas/_libs/algos.cp313-win_amd64.pyd.p/meson-generated_pandas__libs_algos.pyx.c.obj +[7/7] Linking target pandas/_libs/algos.cp313-win_amd64.pyd + Creating library pandas\_libs\algos.cp313-win_amd64.lib and object pandas\_libs\algos.cp313-win_amd64.exp +Activating VS 17.13.6 +INFO: automatically activated MSVC compiler environment +INFO: autodetecting backend as ninja +INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE ++ meson compile +============================= test session starts ============================= +platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 +PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 +rootdir: C:\Users\xaris\panda\pandas +configfile: pyproject.toml +plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 +collected 16742 items + +pandas\tests\indexes\base_class\test_constructors.py ........... +pandas\tests\indexes\base_class\test_formats.py ............. +pandas\tests\indexes\base_class\test_indexing.py ............. +pandas\tests\indexes\base_class\test_pickle.py . +pandas\tests\indexes\base_class\test_reshape.py ...................... +pandas\tests\indexes\base_class\test_setops.py ............................................................ +pandas\tests\indexes\base_class\test_where.py . +pandas\tests\indexes\categorical\test_append.py ....... +pandas\tests\indexes\categorical\test_astype.py ........... +pandas\tests\indexes\categorical\test_category.py .......................................... +pandas\tests\indexes\categorical\test_constructors.py ..... +pandas\tests\indexes\categorical\test_equals.py ......... +pandas\tests\indexes\categorical\test_fillna.py ... +pandas\tests\indexes\categorical\test_formats.py . +pandas\tests\indexes\categorical\test_indexing.py ................................. +pandas\tests\indexes\categorical\test_map.py ..................... +pandas\tests\indexes\categorical\test_reindex.py ....... +pandas\tests\indexes\categorical\test_setops.py .. +pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ +pandas\tests\indexes\datetimelike_\test_equals.py ..................... +pandas\tests\indexes\datetimelike_\test_indexing.py ................ +pandas\tests\indexes\datetimelike_\test_is_monotonic.py . +pandas\tests\indexes\datetimelike_\test_nat.py .... +pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... +pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ +pandas\tests\indexes\datetimes\methods\test_asof.py .. +pandas\tests\indexes\datetimes\methods\test_astype.py ................................. +pandas\tests\indexes\datetimes\methods\test_delete.py ....................... +pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... +pandas\tests\indexes\datetimes\methods\test_fillna.py .. +pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. +pandas\tests\indexes\datetimes\methods\test_map.py ..... +pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss +pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ +pandas\tests\indexes\datetimes\methods\test_snap.py ........................ +pandas\tests\indexes\datetimes\methods\test_to_frame.py .. +pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... +pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ +pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. +pandas\tests\indexes\datetimes\methods\test_to_series.py . +pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... +pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. +pandas\tests\indexes\datetimes\methods\test_unique.py ........................ +pandas\tests\indexes\datetimes\test_arithmetic.py .....................x +pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ +pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\datetimes\test_datetime.py ...................... +pandas\tests\indexes\datetimes\test_formats.py ................................. +pandas\tests\indexes\datetimes\test_freq_attr.py .......................... +pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\test_iter.py ............ +pandas\tests\indexes\datetimes\test_join.py ...................... +pandas\tests\indexes\datetimes\test_npfuncs.py . +pandas\tests\indexes\datetimes\test_ops.py ................ +pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. +pandas\tests\indexes\datetimes\test_pickle.py ...... +pandas\tests\indexes\datetimes\test_reindex.py .. +pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ +pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... +pandas\tests\indexes\datetimes\test_timezones.py ........................................ +pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... +pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. +pandas\tests\indexes\interval\test_equals.py .... +pandas\tests\indexes\interval\test_formats.py ........... +pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... +pandas\tests\indexes\interval\test_join.py ... +pandas\tests\indexes\interval\test_pickle.py .... +pandas\tests\indexes\interval\test_setops.py ................................................................................. +pandas\tests\indexes\multi\test_analytics.py ...................................... +pandas\tests\indexes\multi\test_astype.py ... +pandas\tests\indexes\multi\test_compat.py ...... +pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... +pandas\tests\indexes\multi\test_conversion.py ........ +pandas\tests\indexes\multi\test_copy.py .......... +pandas\tests\indexes\multi\test_drop.py .............. +pandas\tests\indexes\multi\test_duplicates.py ................................................... +pandas\tests\indexes\multi\test_equivalence.py .............. +pandas\tests\indexes\multi\test_formats.py .......... +pandas\tests\indexes\multi\test_get_level_values.py ........ +pandas\tests\indexes\multi\test_get_set.py ................... +pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. +pandas\tests\indexes\multi\test_integrity.py ................. +pandas\tests\indexes\multi\test_isin.py .............. +pandas\tests\indexes\multi\test_join.py ....................................................... +pandas\tests\indexes\multi\test_lexsort.py .. +pandas\tests\indexes\multi\test_missing.py ...x.. +pandas\tests\indexes\multi\test_monotonic.py ........... +pandas\tests\indexes\multi\test_names.py ............................... +pandas\tests\indexes\multi\test_partial_indexing.py ..... +pandas\tests\indexes\multi\test_pickle.py . +pandas\tests\indexes\multi\test_reindex.py ............ +pandas\tests\indexes\multi\test_reshape.py ........... +pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss.........................................F......................F.... +pandas\tests\indexes\multi\test_sorting.py ........................... +pandas\tests\indexes\multi\test_take.py ... +pandas\tests\indexes\multi\test_util.py ............... +pandas\tests\indexes\numeric\test_astype.py ................... +pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... +pandas\tests\indexes\numeric\test_join.py ........... +pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... +pandas\tests\indexes\numeric\test_setops.py .................... +pandas\tests\indexes\object\test_astype.py . +pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\period\methods\test_asfreq.py ............... +pandas\tests\indexes\period\methods\test_astype.py ............. +pandas\tests\indexes\period\methods\test_factorize.py .. +pandas\tests\indexes\period\methods\test_fillna.py . +pandas\tests\indexes\period\methods\test_insert.py ... +pandas\tests\indexes\period\methods\test_is_full.py . +pandas\tests\indexes\period\methods\test_repeat.py ...... +pandas\tests\indexes\period\methods\test_shift.py ...... +pandas\tests\indexes\period\methods\test_to_timestamp.py ......... +pandas\tests\indexes\period\test_constructors.py ......................................................................................................... +pandas\tests\indexes\period\test_formats.py ..... +pandas\tests\indexes\period\test_freq_attr.py . +pandas\tests\indexes\period\test_indexing.py ......................................................................... +pandas\tests\indexes\period\test_join.py ........... +pandas\tests\indexes\period\test_monotonic.py .. +pandas\tests\indexes\period\test_partial_slicing.py .............. +pandas\tests\indexes\period\test_period.py .................................................................................................................................... +pandas\tests\indexes\period\test_period_range.py ........................... +pandas\tests\indexes\period\test_pickle.py .... +pandas\tests\indexes\period\test_resolution.py ......... +pandas\tests\indexes\period\test_scalar_compat.py ... +pandas\tests\indexes\period\test_searchsorted.py ........ +pandas\tests\indexes\period\test_setops.py .............. +pandas\tests\indexes\period\test_tools.py ............ +pandas\tests\indexes\ranges\test_constructors.py ............................. +pandas\tests\indexes\ranges\test_indexing.py ............... +pandas\tests\indexes\ranges\test_join.py .......................................... +pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ +pandas\tests\indexes\ranges\test_setops.py ................................................................... +pandas\tests\indexes\string\test_astype.py . +pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. +pandas\tests\indexes\test_any_index.py .............................................................................................s.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_base.py ............................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss............................................................................................................................ssss.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_common.py ................................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......................................................................................................................................sssssssss...s....ss.............................xs..........................sss................................................sss.................................................................................................s................s........................................................................................................................................................................................................................................................................................xx................FF..XX....FF....xx......................................... +pandas\tests\indexes\test_datetimelike.py ........................................ +pandas\tests\indexes\test_engines.py ......................................... +pandas\tests\indexes\test_frozen.py .......... +pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ +pandas\tests\indexes\test_indexing.py ..........................................................ss..................................s.............................................................................................................................................................................................................................................................................................................................................................................................s.......................... +pandas\tests\indexes\test_numpy_compat.py ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss..................xx..... +pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss...................................................................................................s...........s..................................s.............................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s....................................................s................s.................................s................................sssssssss...s....s...sss........................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... +pandas\tests\indexes\test_setops.py ........................sss......s..................................................................................................................................................................................................................................................................................................................................................................................s.....................................sss......s........................................................................................ss..s.sssss...s.s......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................s................................................................................................................................................................................................................ +pandas\tests\indexes\test_subclass.py . +pandas\tests\indexes\timedeltas\methods\test_astype.py ............... +pandas\tests\indexes\timedeltas\methods\test_factorize.py .. +pandas\tests\indexes\timedeltas\methods\test_fillna.py . +pandas\tests\indexes\timedeltas\methods\test_insert.py ............... +pandas\tests\indexes\timedeltas\methods\test_repeat.py . +pandas\tests\indexes\timedeltas\methods\test_shift.py ...... +pandas\tests\indexes\timedeltas\test_arithmetic.py ... +pandas\tests\indexes\timedeltas\test_constructors.py ........................ +pandas\tests\indexes\timedeltas\test_delete.py ... +pandas\tests\indexes\timedeltas\test_formats.py ..... +pandas\tests\indexes\timedeltas\test_freq_attr.py ........... +pandas\tests\indexes\timedeltas\test_indexing.py .................................... +pandas\tests\indexes\timedeltas\test_join.py ....... +pandas\tests\indexes\timedeltas\test_ops.py .......... +pandas\tests\indexes\timedeltas\test_pickle.py . +pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ +pandas\tests\indexes\timedeltas\test_searchsorted.py ........ +pandas\tests\indexes\timedeltas\test_setops.py ................................ +pandas\tests\indexes\timedeltas\test_timedelta.py ... +pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. + +================================== FAILURES =================================== +________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ +pandas\tests\indexes\multi\test_setops.py:454: in test_difference_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ +pandas\tests\indexes\multi\test_setops.py:475: in test_symmetric_difference_keeping_ea_dtype + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ +pandas\tests\indexes\multi\test_setops.py:607: in test_union_with_duplicates_keep_ea_dtype + Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ +pandas\tests\indexes\multi\test_setops.py:680: in test_union_keep_ea_dtype_with_na + arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ +pandas\tests\indexes\multi\test_setops.py:749: in test_intersection_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ +pandas\tests\indexes\numeric\test_indexing.py:330: in test_get_loc_masked_na + idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_sort_values_with_missing[complex64-first] ________________ +pandas\tests\indexes\test_common.py:477: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +________________ test_sort_values_with_missing[complex64-last] ________________ +pandas\tests\indexes\test_common.py:477: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-first] _____________ +pandas\tests\indexes\test_common.py:477: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-last] ______________ +pandas\tests\indexes\test_common.py:477: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +-------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- +============================ slowest 30 durations ============================= +0.54s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] +0.48s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.28s call pandas/tests/indexes/test_setops.py::test_setop_with_categorical[datetime-tz-None-symmetric_difference] +0.23s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds +0.20s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] +0.16s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] +0.14s setup pandas/tests/indexes/interval/test_formats.py::TestIntervalIndexRendering::test_get_values_for_csv[tuples2-both-expected_data2] +0.13s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] +0.13s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] +0.13s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] +0.11s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] +0.09s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.09s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric +0.09s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] +0.06s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] +0.05s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] +0.05s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] +0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] +0.04s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] +0.04s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] +0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz1] +0.04s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] +=========================== short test summary info =========================== +FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] +==== 14 failed, 16437 passed, 235 skipped, 53 xfailed, 3 xpassed in 31.72s ==== diff --git a/failed_before.txt b/failed_before.txt new file mode 100644 index 0000000000000..0701c78f7de48 --- /dev/null +++ b/failed_before.txt @@ -0,0 +1,450 @@ +[1/1] Generating write_version_file with a custom command +Activating VS 17.13.6 +INFO: automatically activated MSVC compiler environment +INFO: autodetecting backend as ninja +INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE ++ meson compile +============================= test session starts ============================= +platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 +PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 +rootdir: C:\Users\xaris\panda\pandas +configfile: pyproject.toml +plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 +collected 16548 items + +pandas\tests\indexes\base_class\test_constructors.py ........... +pandas\tests\indexes\base_class\test_formats.py ............. +pandas\tests\indexes\base_class\test_indexing.py ............. +pandas\tests\indexes\base_class\test_pickle.py . +pandas\tests\indexes\base_class\test_reshape.py ...................... +pandas\tests\indexes\base_class\test_setops.py ............................................................ +pandas\tests\indexes\base_class\test_where.py . +pandas\tests\indexes\categorical\test_append.py ....... +pandas\tests\indexes\categorical\test_astype.py ........... +pandas\tests\indexes\categorical\test_category.py .......................................... +pandas\tests\indexes\categorical\test_constructors.py ..... +pandas\tests\indexes\categorical\test_equals.py ......... +pandas\tests\indexes\categorical\test_fillna.py ... +pandas\tests\indexes\categorical\test_formats.py . +pandas\tests\indexes\categorical\test_indexing.py ................................. +pandas\tests\indexes\categorical\test_map.py ..................... +pandas\tests\indexes\categorical\test_reindex.py ....... +pandas\tests\indexes\categorical\test_setops.py .. +pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ +pandas\tests\indexes\datetimelike_\test_equals.py ..................... +pandas\tests\indexes\datetimelike_\test_indexing.py ................ +pandas\tests\indexes\datetimelike_\test_is_monotonic.py . +pandas\tests\indexes\datetimelike_\test_nat.py .... +pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... +pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ +pandas\tests\indexes\datetimes\methods\test_asof.py .. +pandas\tests\indexes\datetimes\methods\test_astype.py ................................. +pandas\tests\indexes\datetimes\methods\test_delete.py ....................... +pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... +pandas\tests\indexes\datetimes\methods\test_fillna.py .. +pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. +pandas\tests\indexes\datetimes\methods\test_map.py ..... +pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss +pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ +pandas\tests\indexes\datetimes\methods\test_snap.py ........................ +pandas\tests\indexes\datetimes\methods\test_to_frame.py .. +pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... +pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ +pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. +pandas\tests\indexes\datetimes\methods\test_to_series.py . +pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... +pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. +pandas\tests\indexes\datetimes\methods\test_unique.py ........................ +pandas\tests\indexes\datetimes\test_arithmetic.py .....................x +pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ +pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\datetimes\test_datetime.py ...................... +pandas\tests\indexes\datetimes\test_formats.py ................................. +pandas\tests\indexes\datetimes\test_freq_attr.py .......................... +pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\test_iter.py ............ +pandas\tests\indexes\datetimes\test_join.py ...................... +pandas\tests\indexes\datetimes\test_npfuncs.py . +pandas\tests\indexes\datetimes\test_ops.py ................ +pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. +pandas\tests\indexes\datetimes\test_pickle.py ...... +pandas\tests\indexes\datetimes\test_reindex.py .. +pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ +pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... +pandas\tests\indexes\datetimes\test_timezones.py ........................................ +pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... +pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. +pandas\tests\indexes\interval\test_equals.py .... +pandas\tests\indexes\interval\test_formats.py ........... +pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... +pandas\tests\indexes\interval\test_join.py ... +pandas\tests\indexes\interval\test_pickle.py .... +pandas\tests\indexes\interval\test_setops.py ................................................................................. +pandas\tests\indexes\multi\test_analytics.py ...................................... +pandas\tests\indexes\multi\test_astype.py ... +pandas\tests\indexes\multi\test_compat.py ...... +pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... +pandas\tests\indexes\multi\test_conversion.py ........ +pandas\tests\indexes\multi\test_copy.py .......... +pandas\tests\indexes\multi\test_drop.py .............. +pandas\tests\indexes\multi\test_duplicates.py ................................................... +pandas\tests\indexes\multi\test_equivalence.py .............. +pandas\tests\indexes\multi\test_formats.py .......... +pandas\tests\indexes\multi\test_get_level_values.py ........ +pandas\tests\indexes\multi\test_get_set.py ................... +pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. +pandas\tests\indexes\multi\test_integrity.py ................. +pandas\tests\indexes\multi\test_isin.py .............. +pandas\tests\indexes\multi\test_join.py ....................................................... +pandas\tests\indexes\multi\test_lexsort.py .. +pandas\tests\indexes\multi\test_missing.py ...x.. +pandas\tests\indexes\multi\test_monotonic.py ........... +pandas\tests\indexes\multi\test_names.py ............................... +pandas\tests\indexes\multi\test_partial_indexing.py ..... +pandas\tests\indexes\multi\test_pickle.py . +pandas\tests\indexes\multi\test_reindex.py ............ +pandas\tests\indexes\multi\test_reshape.py ........... +pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss........................................F......................F.... +pandas\tests\indexes\multi\test_sorting.py ........................... +pandas\tests\indexes\multi\test_take.py ... +pandas\tests\indexes\multi\test_util.py ............... +pandas\tests\indexes\numeric\test_astype.py ................... +pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... +pandas\tests\indexes\numeric\test_join.py ........... +pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... +pandas\tests\indexes\numeric\test_setops.py .................... +pandas\tests\indexes\object\test_astype.py . +pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\period\methods\test_asfreq.py ............... +pandas\tests\indexes\period\methods\test_astype.py ............. +pandas\tests\indexes\period\methods\test_factorize.py .. +pandas\tests\indexes\period\methods\test_fillna.py . +pandas\tests\indexes\period\methods\test_insert.py ... +pandas\tests\indexes\period\methods\test_is_full.py . +pandas\tests\indexes\period\methods\test_repeat.py ...... +pandas\tests\indexes\period\methods\test_shift.py ...... +pandas\tests\indexes\period\methods\test_to_timestamp.py ......... +pandas\tests\indexes\period\test_constructors.py ......................................................................................................... +pandas\tests\indexes\period\test_formats.py ..... +pandas\tests\indexes\period\test_freq_attr.py . +pandas\tests\indexes\period\test_indexing.py ......................................................................... +pandas\tests\indexes\period\test_join.py ........... +pandas\tests\indexes\period\test_monotonic.py .. +pandas\tests\indexes\period\test_partial_slicing.py .............. +pandas\tests\indexes\period\test_period.py .................................................................................................................................... +pandas\tests\indexes\period\test_period_range.py ........................... +pandas\tests\indexes\period\test_pickle.py .... +pandas\tests\indexes\period\test_resolution.py ......... +pandas\tests\indexes\period\test_scalar_compat.py ... +pandas\tests\indexes\period\test_searchsorted.py ........ +pandas\tests\indexes\period\test_setops.py .............. +pandas\tests\indexes\period\test_tools.py ............ +pandas\tests\indexes\ranges\test_constructors.py ............................. +pandas\tests\indexes\ranges\test_indexing.py ............... +pandas\tests\indexes\ranges\test_join.py .......................................... +pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ +pandas\tests\indexes\ranges\test_setops.py ................................................................... +pandas\tests\indexes\string\test_astype.py . +pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. +pandas\tests\indexes\test_any_index.py ...........................................................................................s............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\test_base.py ...........................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss.........................................................................................................................ssss................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\test_common.py .........................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..................................................................................................................................sssssssss...s....ss............................xs.........................sss................................................sss............................................................................................s................s................................................................................................................................................................................................................................................................................................FF..XX....FF............................................ +pandas\tests\indexes\test_datetimelike.py ........................................ +pandas\tests\indexes\test_engines.py ......................................... +pandas\tests\indexes\test_frozen.py .......... +pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ +pandas\tests\indexes\test_indexing.py .........................................................ss.................................s...................................................................................................................................................................................................................................................................................................................................................................................s......................... +pandas\tests\indexes\test_mixed_int_string.py . +pandas\tests\indexes\test_numpy_compat.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss....................... +pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss................................................................................................s..........................................................................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s..................................................s................s................................s...............................sssssssss...s....s...sss......................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... +pandas\tests\indexes\test_setops.py ..........................................................................................................................................................................................................................................................................................................................................................................................................s...................................................................................................................................ss..s.s...s...s..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss....................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss...................................................................................................................................................................................................................................................................................s............................................................................................................................................................................................................. +pandas\tests\indexes\test_subclass.py . +pandas\tests\indexes\timedeltas\methods\test_astype.py ............... +pandas\tests\indexes\timedeltas\methods\test_factorize.py .. +pandas\tests\indexes\timedeltas\methods\test_fillna.py . +pandas\tests\indexes\timedeltas\methods\test_insert.py ............... +pandas\tests\indexes\timedeltas\methods\test_repeat.py . +pandas\tests\indexes\timedeltas\methods\test_shift.py ...... +pandas\tests\indexes\timedeltas\test_arithmetic.py ... +pandas\tests\indexes\timedeltas\test_constructors.py ........................ +pandas\tests\indexes\timedeltas\test_delete.py ... +pandas\tests\indexes\timedeltas\test_formats.py ..... +pandas\tests\indexes\timedeltas\test_freq_attr.py ........... +pandas\tests\indexes\timedeltas\test_indexing.py .................................... +pandas\tests\indexes\timedeltas\test_join.py ....... +pandas\tests\indexes\timedeltas\test_ops.py .......... +pandas\tests\indexes\timedeltas\test_pickle.py . +pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ +pandas\tests\indexes\timedeltas\test_searchsorted.py ........ +pandas\tests\indexes\timedeltas\test_setops.py ................................ +pandas\tests\indexes\timedeltas\test_timedelta.py ... +pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. + +================================== FAILURES =================================== +________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ +pandas\tests\indexes\multi\test_setops.py:454: in test_difference_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ +pandas\tests\indexes\multi\test_setops.py:475: in test_symmetric_difference_keeping_ea_dtype + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ +pandas\tests\indexes\multi\test_setops.py:607: in test_union_with_duplicates_keep_ea_dtype + Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ +pandas\tests\indexes\multi\test_setops.py:679: in test_union_keep_ea_dtype_with_na + arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ +pandas\tests\indexes\multi\test_setops.py:748: in test_intersection_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ +pandas\tests\indexes\numeric\test_indexing.py:330: in test_get_loc_masked_na + idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_sort_values_with_missing[complex64-first] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +________________ test_sort_values_with_missing[complex64-last] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-first] _____________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-last] ______________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +-------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- +============================ slowest 30 durations ============================= +1.06s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] +0.83s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.44s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] +0.39s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds +0.37s call pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[int8-None-None-None] +0.29s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] +0.29s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] +0.28s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference +0.28s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] +0.28s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] +0.26s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] +0.26s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] +0.26s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] +0.26s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] +0.22s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] +0.20s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric +0.19s call pandas/tests/indexes/interval/test_indexing.py::TestGetIndexer::test_get_indexer_with_int_and_float[query6-expected6] +0.15s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.13s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] +0.12s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst +0.11s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] +0.10s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] +0.10s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] +0.10s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] +0.10s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] +0.10s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] +0.09s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] +0.08s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz1] +0.08s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] +0.08s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] +=========================== short test summary info =========================== +FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] += 14 failed, 16264 passed, 221 skipped, 46 xfailed, 3 xpassed in 67.23s (0:01:07) = From edb84e499f6e730e08981fa1c9f06edb9eeb750c Mon Sep 17 00:00:00 2001 From: xaris96 Date: Wed, 23 Apr 2025 12:14:26 +0300 Subject: [PATCH 15/32] fixed test_union_duplicates[mixed-int-string] test fail in tests\indexes\multi\test_setops.py --- after.txt | 693 ++++++++++++++++++++++ before.txt | 458 ++++++++++++++ fail_dif.txt | 44 ++ failed_after.txt | 23 + failed_before.txt | 14 + pandas/conftest.py | 2 +- pandas/tests/indexes/multi/test_setops.py | 4 + 7 files changed, 1237 insertions(+), 1 deletion(-) create mode 100644 after.txt create mode 100644 before.txt create mode 100644 fail_dif.txt create mode 100644 failed_after.txt create mode 100644 failed_before.txt diff --git a/after.txt b/after.txt new file mode 100644 index 0000000000000..b904b59583283 --- /dev/null +++ b/after.txt @@ -0,0 +1,693 @@ ++ meson compile +Activating VS 17.13.6 +INFO: automatically activated MSVC compiler environment +INFO: autodetecting backend as ninja +INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE +[1/1] Generating write_version_file with a custom command +============================= test session starts ============================= +platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 +PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 +rootdir: C:\Users\xaris\panda\pandas +configfile: pyproject.toml +plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 +collected 16743 items + +pandas\tests\indexes\base_class\test_constructors.py ........... +pandas\tests\indexes\base_class\test_formats.py ............. +pandas\tests\indexes\base_class\test_indexing.py ............. +pandas\tests\indexes\base_class\test_pickle.py . +pandas\tests\indexes\base_class\test_reshape.py ...................... +pandas\tests\indexes\base_class\test_setops.py ............................................................ +pandas\tests\indexes\base_class\test_where.py . +pandas\tests\indexes\categorical\test_append.py ....... +pandas\tests\indexes\categorical\test_astype.py ........... +pandas\tests\indexes\categorical\test_category.py .......................................... +pandas\tests\indexes\categorical\test_constructors.py ..... +pandas\tests\indexes\categorical\test_equals.py ......... +pandas\tests\indexes\categorical\test_fillna.py ... +pandas\tests\indexes\categorical\test_formats.py . +pandas\tests\indexes\categorical\test_indexing.py ................................. +pandas\tests\indexes\categorical\test_map.py ..................... +pandas\tests\indexes\categorical\test_reindex.py ....... +pandas\tests\indexes\categorical\test_setops.py .. +pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ +pandas\tests\indexes\datetimelike_\test_equals.py ..................... +pandas\tests\indexes\datetimelike_\test_indexing.py ................ +pandas\tests\indexes\datetimelike_\test_is_monotonic.py . +pandas\tests\indexes\datetimelike_\test_nat.py .... +pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... +pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ +pandas\tests\indexes\datetimes\methods\test_asof.py .. +pandas\tests\indexes\datetimes\methods\test_astype.py ................................. +pandas\tests\indexes\datetimes\methods\test_delete.py ....................... +pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... +pandas\tests\indexes\datetimes\methods\test_fillna.py .. +pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. +pandas\tests\indexes\datetimes\methods\test_map.py ..... +pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss +pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ +pandas\tests\indexes\datetimes\methods\test_snap.py ........................ +pandas\tests\indexes\datetimes\methods\test_to_frame.py .. +pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... +pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ +pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. +pandas\tests\indexes\datetimes\methods\test_to_series.py . +pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... +pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. +pandas\tests\indexes\datetimes\methods\test_unique.py ........................ +pandas\tests\indexes\datetimes\test_arithmetic.py .....................x +pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ +pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\datetimes\test_datetime.py ...................... +pandas\tests\indexes\datetimes\test_formats.py ................................. +pandas\tests\indexes\datetimes\test_freq_attr.py .......................... +pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\test_iter.py ............ +pandas\tests\indexes\datetimes\test_join.py ...................... +pandas\tests\indexes\datetimes\test_npfuncs.py . +pandas\tests\indexes\datetimes\test_ops.py ................ +pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. +pandas\tests\indexes\datetimes\test_pickle.py ...... +pandas\tests\indexes\datetimes\test_reindex.py .. +pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ +pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... +pandas\tests\indexes\datetimes\test_timezones.py ........................................ +pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... +pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. +pandas\tests\indexes\interval\test_equals.py .... +pandas\tests\indexes\interval\test_formats.py ........... +pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... +pandas\tests\indexes\interval\test_join.py ... +pandas\tests\indexes\interval\test_pickle.py .... +pandas\tests\indexes\interval\test_setops.py ................................................................................. +pandas\tests\indexes\multi\test_analytics.py ...................................... +pandas\tests\indexes\multi\test_astype.py ... +pandas\tests\indexes\multi\test_compat.py ...... +pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... +pandas\tests\indexes\multi\test_conversion.py ........ +pandas\tests\indexes\multi\test_copy.py .......... +pandas\tests\indexes\multi\test_drop.py .............. +pandas\tests\indexes\multi\test_duplicates.py ................................................... +pandas\tests\indexes\multi\test_equivalence.py .............. +pandas\tests\indexes\multi\test_formats.py .......... +pandas\tests\indexes\multi\test_get_level_values.py ........ +pandas\tests\indexes\multi\test_get_set.py ................... +pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. +pandas\tests\indexes\multi\test_integrity.py ................. +pandas\tests\indexes\multi\test_isin.py .............. +pandas\tests\indexes\multi\test_join.py ....................................................... +pandas\tests\indexes\multi\test_lexsort.py .. +pandas\tests\indexes\multi\test_missing.py ...x.. +pandas\tests\indexes\multi\test_monotonic.py ........... +pandas\tests\indexes\multi\test_names.py ............................... +pandas\tests\indexes\multi\test_partial_indexing.py ..... +pandas\tests\indexes\multi\test_pickle.py . +pandas\tests\indexes\multi\test_reindex.py ............ +pandas\tests\indexes\multi\test_reshape.py ........... +pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss.........F...............................F......................F.... +pandas\tests\indexes\multi\test_sorting.py ........................... +pandas\tests\indexes\multi\test_take.py ... +pandas\tests\indexes\multi\test_util.py ............... +pandas\tests\indexes\numeric\test_astype.py ................... +pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... +pandas\tests\indexes\numeric\test_join.py ........... +pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... +pandas\tests\indexes\numeric\test_setops.py .................... +pandas\tests\indexes\object\test_astype.py . +pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\period\methods\test_asfreq.py ............... +pandas\tests\indexes\period\methods\test_astype.py ............. +pandas\tests\indexes\period\methods\test_factorize.py .. +pandas\tests\indexes\period\methods\test_fillna.py . +pandas\tests\indexes\period\methods\test_insert.py ... +pandas\tests\indexes\period\methods\test_is_full.py . +pandas\tests\indexes\period\methods\test_repeat.py ...... +pandas\tests\indexes\period\methods\test_shift.py ...... +pandas\tests\indexes\period\methods\test_to_timestamp.py ......... +pandas\tests\indexes\period\test_constructors.py ......................................................................................................... +pandas\tests\indexes\period\test_formats.py ..... +pandas\tests\indexes\period\test_freq_attr.py . +pandas\tests\indexes\period\test_indexing.py ......................................................................... +pandas\tests\indexes\period\test_join.py ........... +pandas\tests\indexes\period\test_monotonic.py .. +pandas\tests\indexes\period\test_partial_slicing.py .............. +pandas\tests\indexes\period\test_period.py .................................................................................................................................... +pandas\tests\indexes\period\test_period_range.py ........................... +pandas\tests\indexes\period\test_pickle.py .... +pandas\tests\indexes\period\test_resolution.py ......... +pandas\tests\indexes\period\test_scalar_compat.py ... +pandas\tests\indexes\period\test_searchsorted.py ........ +pandas\tests\indexes\period\test_setops.py .............. +pandas\tests\indexes\period\test_tools.py ............ +pandas\tests\indexes\ranges\test_constructors.py ............................. +pandas\tests\indexes\ranges\test_indexing.py ............... +pandas\tests\indexes\ranges\test_join.py .......................................... +pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ +pandas\tests\indexes\ranges\test_setops.py ................................................................... +pandas\tests\indexes\string\test_astype.py . +pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. +pandas\tests\indexes\test_any_index.py .............................................................................................s.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_base.py ............................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss............................................................................................................................ssss.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_common.py ................................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......................................................................................................................................sssssssss...s....ss.............................xs..........................sss................................................sss.................................................................................................s................s........................................................................................................................................................................................................................................................................................FF................FF..XX....FF....FF......................................... +pandas\tests\indexes\test_datetimelike.py ........................................ +pandas\tests\indexes\test_engines.py ......................................... +pandas\tests\indexes\test_frozen.py .......... +pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ +pandas\tests\indexes\test_indexing.py ..........................................................ss..................................s.............................................................................................................................................................................................................................................................................................................................................................................................s.......................... +pandas\tests\indexes\test_mixed_int_string.py . +pandas\tests\indexes\test_numpy_compat.py ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss..................FF..... +pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss...................................................................................................s...........F..................................F.............................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s....................................................s................s.................................s................................sssssssss...s....s...sss........................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... +pandas\tests\indexes\test_setops.py .................................F...............................F..................................................................................................................................................................................................................................................................................................................................................s..............................................F........................................................................................ss..s.s...s...s.F.......................................................................................................................................................................................................................................................................................................................FFFFF...........................................................................................................................................................................................................................................................................................................................FFFFF..........................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................s................................................................................................................................................................................................................ +pandas\tests\indexes\test_subclass.py . +pandas\tests\indexes\timedeltas\methods\test_astype.py ............... +pandas\tests\indexes\timedeltas\methods\test_factorize.py .. +pandas\tests\indexes\timedeltas\methods\test_fillna.py . +pandas\tests\indexes\timedeltas\methods\test_insert.py ............... +pandas\tests\indexes\timedeltas\methods\test_repeat.py . +pandas\tests\indexes\timedeltas\methods\test_shift.py ...... +pandas\tests\indexes\timedeltas\test_arithmetic.py ... +pandas\tests\indexes\timedeltas\test_constructors.py ........................ +pandas\tests\indexes\timedeltas\test_delete.py ... +pandas\tests\indexes\timedeltas\test_formats.py ..... +pandas\tests\indexes\timedeltas\test_freq_attr.py ........... +pandas\tests\indexes\timedeltas\test_indexing.py .................................... +pandas\tests\indexes\timedeltas\test_join.py ....... +pandas\tests\indexes\timedeltas\test_ops.py .......... +pandas\tests\indexes\timedeltas\test_pickle.py . +pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ +pandas\tests\indexes\timedeltas\test_searchsorted.py ........ +pandas\tests\indexes\timedeltas\test_setops.py ................................ +pandas\tests\indexes\timedeltas\test_timedelta.py ... +pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. + +================================== FAILURES =================================== +________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ +pandas\tests\indexes\multi\test_setops.py:454: in test_difference_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ +pandas\tests\indexes\multi\test_setops.py:475: in test_symmetric_difference_keeping_ea_dtype + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ +pandas\tests\indexes\multi\test_setops.py:607: in test_union_with_duplicates_keep_ea_dtype + Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +___________________ test_union_duplicates[mixed-int-string] ___________________ +pandas\core\indexes\multi.py:3916: in _union + result = result.sort_values() +pandas\core\indexes\base.py:5798: in sort_values + _as = idx.argsort(na_position=na_position) +pandas\core\indexes\multi.py:2403: in argsort + target = self._sort_levels_monotonic(raise_if_incomparable=True) +pandas\core\indexes\multi.py:2101: in _sort_levels_monotonic + indexer = lev.argsort() +pandas\core\indexes\base.py:5907: in argsort + return self._data.argsort(*args, **kwargs) +E TypeError: '<' not supported between instances of 'str' and 'int' + +During handling of the above exception, another exception occurred: +pandas\tests\indexes\multi\test_setops.py:636: in test_union_duplicates + result = mi2.union(mi1) +pandas\core\indexes\base.py:3098: in union + result = self._union(other, sort=sort) +pandas\core\indexes\multi.py:3920: in _union + warnings.warn( +E RuntimeWarning: The values in the array are unorderable. Pass `sort=False` to suppress this warning. +__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ +pandas\tests\indexes\multi\test_setops.py:679: in test_union_keep_ea_dtype_with_na + arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ +pandas\tests\indexes\multi\test_setops.py:748: in test_intersection_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ +pandas\tests\indexes\numeric\test_indexing.py:330: in test_get_loc_masked_na + idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_________ test_sort_values_invalid_na_position[mixed-int-string-None] _________ +pandas\tests\indexes\test_common.py:444: in test_sort_values_invalid_na_position + index_with_missing.sort_values(na_position=na_position) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +________ test_sort_values_invalid_na_position[mixed-int-string-middle] ________ +pandas\tests\indexes\test_common.py:444: in test_sort_values_invalid_na_position + index_with_missing.sort_values(na_position=na_position) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_______________ test_sort_values_with_missing[complex64-first] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +________________ test_sort_values_with_missing[complex64-last] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-first] _____________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-last] ______________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ test_sort_values_with_missing[mixed-int-string-first] ____________ +pandas\tests\indexes\test_common.py:462: in test_sort_values_with_missing + sorted_values = np.sort(not_na_vals) +env\Lib\site-packages\numpy\core\fromnumeric.py:1017: in sort + a.sort(axis=axis, kind=kind, order=order) +E TypeError: '<' not supported between instances of 'int' and 'str' +____________ test_sort_values_with_missing[mixed-int-string-last] _____________ +pandas\tests\indexes\test_common.py:462: in test_sort_values_with_missing + sorted_values = np.sort(not_na_vals) +env\Lib\site-packages\numpy\core\fromnumeric.py:1017: in sort + a.sort(axis=axis, kind=kind, order=order) +E TypeError: '<' not supported between instances of 'int' and 'str' +___________ test_numpy_ufuncs_reductions[mixed-int-string-maximum] ____________ +pandas\tests\indexes\test_numpy_compat.py:164: in test_numpy_ufuncs_reductions + result = func.reduce(index) +pandas\core\indexes\base.py:939: in __array_ufunc__ + result = arraylike.dispatch_reduction_ufunc( +pandas\core\arraylike.py:530: in dispatch_reduction_ufunc + return getattr(self, method_name)(skipna=False, **kwargs) +pandas\core\indexes\base.py:7451: in max + return nanops.nanmax(self._values, skipna=skipna) +pandas\core\nanops.py:149: in f + result = alt(values, axis=axis, skipna=skipna, **kwds) +pandas\core\nanops.py:406: in new_func + result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs) +pandas\core\nanops.py:1100: in reduction + result = getattr(values, meth)(axis) +env\Lib\site-packages\numpy\core\_methods.py:41: in _amax + return umr_maximum(a, axis, None, out, keepdims, initial, where) +E TypeError: '>=' not supported between instances of 'int' and 'str' +___________ test_numpy_ufuncs_reductions[mixed-int-string-minimum] ____________ +pandas\tests\indexes\test_numpy_compat.py:164: in test_numpy_ufuncs_reductions + result = func.reduce(index) +pandas\core\indexes\base.py:939: in __array_ufunc__ + result = arraylike.dispatch_reduction_ufunc( +pandas\core\arraylike.py:530: in dispatch_reduction_ufunc + return getattr(self, method_name)(skipna=False, **kwargs) +pandas\core\indexes\base.py:7387: in min + return nanops.nanmin(self._values, skipna=skipna) +pandas\core\nanops.py:149: in f + result = alt(values, axis=axis, skipna=skipna, **kwds) +pandas\core\nanops.py:406: in new_func + result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs) +pandas\core\nanops.py:1100: in reduction + result = getattr(values, meth)(axis) +env\Lib\site-packages\numpy\core\_methods.py:45: in _amin + return umr_minimum(a, axis, None, out, keepdims, initial, where) +E TypeError: '<=' not supported between instances of 'int' and 'str' +___________________ TestBase.test_argsort[mixed-int-string] ___________________ +pandas\tests\indexes\test_old_base.py:361: in test_argsort + result = index.argsort() +pandas\core\indexes\base.py:5907: in argsort + return self._data.argsort(*args, **kwargs) +E TypeError: '<' not supported between instances of 'str' and 'int' +________________ TestBase.test_numpy_argsort[mixed-int-string] ________________ +env\Lib\site-packages\numpy\core\fromnumeric.py:59: in _wrapfunc + return bound(*args, **kwds) +pandas\core\indexes\base.py:5907: in argsort + return self._data.argsort(*args, **kwargs) +E TypeError: '<' not supported between instances of 'str' and 'int' + +During handling of the above exception, another exception occurred: +pandas\tests\indexes\test_old_base.py:366: in test_numpy_argsort + result = np.argsort(index) +env\Lib\site-packages\numpy\core\fromnumeric.py:1133: in argsort + return _wrapfunc(a, 'argsort', axis=axis, kind=kind, order=order) +env\Lib\site-packages\numpy\core\fromnumeric.py:68: in _wrapfunc + return _wrapit(obj, method, *args, **kwds) +env\Lib\site-packages\numpy\core\fromnumeric.py:45: in _wrapit + result = getattr(asarray(obj), method)(*args, **kwds) +E TypeError: '<' not supported between instances of 'str' and 'int' +___________________ test_union_same_types[mixed-int-string] ___________________ +pandas\tests\indexes\test_setops.py:68: in test_union_same_types + idx1 = index.sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +________________ test_union_different_types[mixed-int-string] _________________ +pandas\tests\indexes\test_setops.py:132: in test_union_different_types + idx1 = idx1.sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +________________ TestSetOps.test_union_base[mixed-int-string] _________________ +pandas\tests\indexes\test_setops.py:257: in test_union_base + tm.assert_index_equal(union.sort_values(), everything.sort_values()) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +___________ TestSetOps.test_symmetric_difference[mixed-int-string] ____________ +pandas\tests\indexes\test_setops.py:322: in test_symmetric_difference + tm.assert_index_equal(result.sort_values(), answer.sort_values()) +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +____________ TestSetOps.test_union_unequal[mixed-int-string-A-A-A] ____________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +__________ TestSetOps.test_union_unequal[mixed-int-string-A-B-None] ___________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +_________ TestSetOps.test_union_unequal[mixed-int-string-A-None-None] _________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +_________ TestSetOps.test_union_unequal[mixed-int-string-None-B-None] _________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +_______ TestSetOps.test_union_unequal[mixed-int-string-None-None-None] ________ +pandas\tests\indexes\test_setops.py:401: in test_union_unequal + union = first.union(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'str' and 'int' +__________ TestSetOps.test_intersect_unequal[mixed-int-string-A-A-A] __________ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +________ TestSetOps.test_intersect_unequal[mixed-int-string-A-B-None] _________ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_______ TestSetOps.test_intersect_unequal[mixed-int-string-A-None-None] _______ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_______ TestSetOps.test_intersect_unequal[mixed-int-string-None-B-None] _______ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +_____ TestSetOps.test_intersect_unequal[mixed-int-string-None-None-None] ______ +pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal + intersect = first.intersection(second).sort_values() +pandas\core\indexes\base.py:5793: in sort_values + _as = nargsort( +pandas\core\sorting.py:438: in nargsort + indexer = non_nan_idx[non_nans.argsort(kind=kind)] +E TypeError: '<' not supported between instances of 'int' and 'str' +-------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- +============================ slowest 30 durations ============================= +0.48s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] +0.34s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.26s call pandas/tests/indexes/test_old_base.py::TestBase::test_map[simple_index4] +0.23s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds +0.18s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] +0.14s call pandas/tests/indexes/interval/test_indexing.py::TestGetLoc::test_get_loc_scalar[both-3.5] +0.11s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] +0.09s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] +0.08s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric +0.07s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.06s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] +0.05s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] +0.04s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] +0.04s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] +0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] +0.04s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] +0.03s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz1] +0.03s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] +=========================== short test summary info =========================== +FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_duplicates[mixed-int-string] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-None-None] +==== 37 failed, 16435 passed, 221 skipped, 47 xfailed, 3 xpassed in 31.64s ==== diff --git a/before.txt b/before.txt new file mode 100644 index 0000000000000..ad3df2b6cadc8 --- /dev/null +++ b/before.txt @@ -0,0 +1,458 @@ ++ meson compile +Activating VS 17.13.6 +INFO: automatically activated MSVC compiler environment +INFO: autodetecting backend as ninja +INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE +[1/7] Generating write_version_file with a custom command +[2/7] Compiling Cython source C:/Users/xaris/panda/pandas/pandas/_libs/tslibs/timestamps.pyx +[3/7] Compiling Cython source C:/Users/xaris/panda/pandas/pandas/_libs/algos.pyx +[4/7] Compiling C object pandas/_libs/tslibs/timestamps.cp313-win_amd64.pyd.p/meson-generated_pandas__libs_tslibs_timestamps.pyx.c.obj +[5/7] Linking target pandas/_libs/tslibs/timestamps.cp313-win_amd64.pyd + Creating library pandas\_libs\tslibs\timestamps.cp313-win_amd64.lib and object pandas\_libs\tslibs\timestamps.cp313-win_amd64.exp +[6/7] Compiling C object pandas/_libs/algos.cp313-win_amd64.pyd.p/meson-generated_pandas__libs_algos.pyx.c.obj +[7/7] Linking target pandas/_libs/algos.cp313-win_amd64.pyd + Creating library pandas\_libs\algos.cp313-win_amd64.lib and object pandas\_libs\algos.cp313-win_amd64.exp +============================= test session starts ============================= +platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 +PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 +rootdir: C:\Users\xaris\panda\pandas +configfile: pyproject.toml +plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 +collected 16548 items + +pandas\tests\indexes\base_class\test_constructors.py ........... +pandas\tests\indexes\base_class\test_formats.py ............. +pandas\tests\indexes\base_class\test_indexing.py ............. +pandas\tests\indexes\base_class\test_pickle.py . +pandas\tests\indexes\base_class\test_reshape.py ...................... +pandas\tests\indexes\base_class\test_setops.py ............................................................ +pandas\tests\indexes\base_class\test_where.py . +pandas\tests\indexes\categorical\test_append.py ....... +pandas\tests\indexes\categorical\test_astype.py ........... +pandas\tests\indexes\categorical\test_category.py .......................................... +pandas\tests\indexes\categorical\test_constructors.py ..... +pandas\tests\indexes\categorical\test_equals.py ......... +pandas\tests\indexes\categorical\test_fillna.py ... +pandas\tests\indexes\categorical\test_formats.py . +pandas\tests\indexes\categorical\test_indexing.py ................................. +pandas\tests\indexes\categorical\test_map.py ..................... +pandas\tests\indexes\categorical\test_reindex.py ....... +pandas\tests\indexes\categorical\test_setops.py .. +pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ +pandas\tests\indexes\datetimelike_\test_equals.py ..................... +pandas\tests\indexes\datetimelike_\test_indexing.py ................ +pandas\tests\indexes\datetimelike_\test_is_monotonic.py . +pandas\tests\indexes\datetimelike_\test_nat.py .... +pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... +pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ +pandas\tests\indexes\datetimes\methods\test_asof.py .. +pandas\tests\indexes\datetimes\methods\test_astype.py ................................. +pandas\tests\indexes\datetimes\methods\test_delete.py ....................... +pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... +pandas\tests\indexes\datetimes\methods\test_fillna.py .. +pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. +pandas\tests\indexes\datetimes\methods\test_map.py ..... +pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss +pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ +pandas\tests\indexes\datetimes\methods\test_snap.py ........................ +pandas\tests\indexes\datetimes\methods\test_to_frame.py .. +pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... +pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ +pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. +pandas\tests\indexes\datetimes\methods\test_to_series.py . +pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... +pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. +pandas\tests\indexes\datetimes\methods\test_unique.py ........................ +pandas\tests\indexes\datetimes\test_arithmetic.py .....................x +pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ +pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\datetimes\test_datetime.py ...................... +pandas\tests\indexes\datetimes\test_formats.py ................................. +pandas\tests\indexes\datetimes\test_freq_attr.py .......................... +pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\test_iter.py ............ +pandas\tests\indexes\datetimes\test_join.py ...................... +pandas\tests\indexes\datetimes\test_npfuncs.py . +pandas\tests\indexes\datetimes\test_ops.py ................ +pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. +pandas\tests\indexes\datetimes\test_pickle.py ...... +pandas\tests\indexes\datetimes\test_reindex.py .. +pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ +pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... +pandas\tests\indexes\datetimes\test_timezones.py ........................................ +pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... +pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. +pandas\tests\indexes\interval\test_equals.py .... +pandas\tests\indexes\interval\test_formats.py ........... +pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... +pandas\tests\indexes\interval\test_join.py ... +pandas\tests\indexes\interval\test_pickle.py .... +pandas\tests\indexes\interval\test_setops.py ................................................................................. +pandas\tests\indexes\multi\test_analytics.py ...................................... +pandas\tests\indexes\multi\test_astype.py ... +pandas\tests\indexes\multi\test_compat.py ...... +pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... +pandas\tests\indexes\multi\test_conversion.py ........ +pandas\tests\indexes\multi\test_copy.py .......... +pandas\tests\indexes\multi\test_drop.py .............. +pandas\tests\indexes\multi\test_duplicates.py ................................................... +pandas\tests\indexes\multi\test_equivalence.py .............. +pandas\tests\indexes\multi\test_formats.py .......... +pandas\tests\indexes\multi\test_get_level_values.py ........ +pandas\tests\indexes\multi\test_get_set.py ................... +pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. +pandas\tests\indexes\multi\test_integrity.py ................. +pandas\tests\indexes\multi\test_isin.py .............. +pandas\tests\indexes\multi\test_join.py ....................................................... +pandas\tests\indexes\multi\test_lexsort.py .. +pandas\tests\indexes\multi\test_missing.py ...x.. +pandas\tests\indexes\multi\test_monotonic.py ........... +pandas\tests\indexes\multi\test_names.py ............................... +pandas\tests\indexes\multi\test_partial_indexing.py ..... +pandas\tests\indexes\multi\test_pickle.py . +pandas\tests\indexes\multi\test_reindex.py ............ +pandas\tests\indexes\multi\test_reshape.py ........... +pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss........................................F......................F.... +pandas\tests\indexes\multi\test_sorting.py ........................... +pandas\tests\indexes\multi\test_take.py ... +pandas\tests\indexes\multi\test_util.py ............... +pandas\tests\indexes\numeric\test_astype.py ................... +pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... +pandas\tests\indexes\numeric\test_join.py ........... +pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... +pandas\tests\indexes\numeric\test_setops.py .................... +pandas\tests\indexes\object\test_astype.py . +pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\period\methods\test_asfreq.py ............... +pandas\tests\indexes\period\methods\test_astype.py ............. +pandas\tests\indexes\period\methods\test_factorize.py .. +pandas\tests\indexes\period\methods\test_fillna.py . +pandas\tests\indexes\period\methods\test_insert.py ... +pandas\tests\indexes\period\methods\test_is_full.py . +pandas\tests\indexes\period\methods\test_repeat.py ...... +pandas\tests\indexes\period\methods\test_shift.py ...... +pandas\tests\indexes\period\methods\test_to_timestamp.py ......... +pandas\tests\indexes\period\test_constructors.py ......................................................................................................... +pandas\tests\indexes\period\test_formats.py ..... +pandas\tests\indexes\period\test_freq_attr.py . +pandas\tests\indexes\period\test_indexing.py ......................................................................... +pandas\tests\indexes\period\test_join.py ........... +pandas\tests\indexes\period\test_monotonic.py .. +pandas\tests\indexes\period\test_partial_slicing.py .............. +pandas\tests\indexes\period\test_period.py .................................................................................................................................... +pandas\tests\indexes\period\test_period_range.py ........................... +pandas\tests\indexes\period\test_pickle.py .... +pandas\tests\indexes\period\test_resolution.py ......... +pandas\tests\indexes\period\test_scalar_compat.py ... +pandas\tests\indexes\period\test_searchsorted.py ........ +pandas\tests\indexes\period\test_setops.py .............. +pandas\tests\indexes\period\test_tools.py ............ +pandas\tests\indexes\ranges\test_constructors.py ............................. +pandas\tests\indexes\ranges\test_indexing.py ............... +pandas\tests\indexes\ranges\test_join.py .......................................... +pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ +pandas\tests\indexes\ranges\test_setops.py ................................................................... +pandas\tests\indexes\string\test_astype.py . +pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. +pandas\tests\indexes\test_any_index.py ...........................................................................................s............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\test_base.py ...........................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss.........................................................................................................................ssss................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\test_common.py .........................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..................................................................................................................................sssssssss...s....ss............................xs.........................sss................................................sss............................................................................................s................s................................................................................................................................................................................................................................................................................................FF..XX....FF............................................ +pandas\tests\indexes\test_datetimelike.py ........................................ +pandas\tests\indexes\test_engines.py ......................................... +pandas\tests\indexes\test_frozen.py .......... +pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ +pandas\tests\indexes\test_indexing.py .........................................................ss.................................s...................................................................................................................................................................................................................................................................................................................................................................................s......................... +pandas\tests\indexes\test_mixed_int_string.py . +pandas\tests\indexes\test_numpy_compat.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss....................... +pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss................................................................................................s..........................................................................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s..................................................s................s................................s...............................sssssssss...s....s...sss......................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... +pandas\tests\indexes\test_setops.py ..........................................................................................................................................................................................................................................................................................................................................................................................................s...................................................................................................................................ss..s.s...s...s..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss....................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss...................................................................................................................................................................................................................................................................................s............................................................................................................................................................................................................. +pandas\tests\indexes\test_subclass.py . +pandas\tests\indexes\timedeltas\methods\test_astype.py ............... +pandas\tests\indexes\timedeltas\methods\test_factorize.py .. +pandas\tests\indexes\timedeltas\methods\test_fillna.py . +pandas\tests\indexes\timedeltas\methods\test_insert.py ............... +pandas\tests\indexes\timedeltas\methods\test_repeat.py . +pandas\tests\indexes\timedeltas\methods\test_shift.py ...... +pandas\tests\indexes\timedeltas\test_arithmetic.py ... +pandas\tests\indexes\timedeltas\test_constructors.py ........................ +pandas\tests\indexes\timedeltas\test_delete.py ... +pandas\tests\indexes\timedeltas\test_formats.py ..... +pandas\tests\indexes\timedeltas\test_freq_attr.py ........... +pandas\tests\indexes\timedeltas\test_indexing.py .................................... +pandas\tests\indexes\timedeltas\test_join.py ....... +pandas\tests\indexes\timedeltas\test_ops.py .......... +pandas\tests\indexes\timedeltas\test_pickle.py . +pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ +pandas\tests\indexes\timedeltas\test_searchsorted.py ........ +pandas\tests\indexes\timedeltas\test_setops.py ................................ +pandas\tests\indexes\timedeltas\test_timedelta.py ... +pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. + +================================== FAILURES =================================== +________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ +pandas\tests\indexes\multi\test_setops.py:454: in test_difference_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ +pandas\tests\indexes\multi\test_setops.py:475: in test_symmetric_difference_keeping_ea_dtype + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ +pandas\tests\indexes\multi\test_setops.py:607: in test_union_with_duplicates_keep_ea_dtype + Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ +pandas\tests\indexes\multi\test_setops.py:679: in test_union_keep_ea_dtype_with_na + arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ +pandas\tests\indexes\multi\test_setops.py:748: in test_intersection_keep_ea_dtypes + [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ +pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked + idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ +pandas\tests\indexes\numeric\test_indexing.py:330: in test_get_loc_masked_na + idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ +pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na + idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_______________ test_sort_values_with_missing[complex64-first] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +________________ test_sort_values_with_missing[complex64-last] ________________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +pandas\core\construction.py:831: in _try_cast + subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-first] _____________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +_____________ test_sort_values_with_missing[nullable_float-last] ______________ +pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing + expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +pandas\core\arrays\floating.py:55: in _safe_cast + return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast +-------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- +============================ slowest 30 durations ============================= +0.51s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] +0.35s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.27s call pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[int8-None-None-None] +0.24s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds +0.18s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] +0.13s call pandas/tests/indexes/interval/test_indexing.py::TestGetIndexer::test_get_indexer_with_int_and_float[query6-expected6] +0.12s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] +0.11s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] +0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] +0.09s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric +0.08s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] +0.07s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.06s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst +0.06s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] +0.05s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] +0.05s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] +0.04s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] +0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] +0.04s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] +0.04s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip['Asia/Tokyo'] +0.04s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] +=========================== short test summary info =========================== +FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] +==== 14 failed, 16264 passed, 221 skipped, 46 xfailed, 3 xpassed in 30.02s ==== diff --git a/fail_dif.txt b/fail_dif.txt new file mode 100644 index 0000000000000..72bd22fb391ce --- /dev/null +++ b/fail_dif.txt @@ -0,0 +1,44 @@ +Comparing files failed_before.txt and FAILED_AFTER.TXT +***** failed_before.txt +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +***** FAILED_AFTER.TXT +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_duplicates[mixed-int-string] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +***** + +***** failed_before.txt +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +***** FAILED_AFTER.TXT +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +***** + +***** failed_before.txt +***** FAILED_AFTER.TXT +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-None-None] +***** + diff --git a/failed_after.txt b/failed_after.txt new file mode 100644 index 0000000000000..f62a173098972 --- /dev/null +++ b/failed_after.txt @@ -0,0 +1,23 @@ +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_duplicates[mixed-int-string] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-A-A] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-None-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-B-None] +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-None-None] diff --git a/failed_before.txt b/failed_before.txt new file mode 100644 index 0000000000000..a7c34aa436617 --- /dev/null +++ b/failed_before.txt @@ -0,0 +1,14 @@ +FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] diff --git a/pandas/conftest.py b/pandas/conftest.py index 9db58c9a82dd3..50894df87be5a 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -706,7 +706,7 @@ def _create_mi_with_dt64tz_level(): "string-python": Index( pd.array([f"pandas_{i}" for i in range(10)], dtype="string[python]") ), - "mixed-int-string": Index([0, "a", 1, "b", 2, "c"]), + "mixed-int-string": Index([0, "a", 1, "b", 2, "c"]) } if has_pyarrow: idx = Index(pd.array([f"pandas_{i}" for i in range(10)], dtype="string[pyarrow]")) diff --git a/pandas/tests/indexes/multi/test_setops.py b/pandas/tests/indexes/multi/test_setops.py index f7544cf62e5fa..7dbb1cd6e3ddd 100644 --- a/pandas/tests/indexes/multi/test_setops.py +++ b/pandas/tests/indexes/multi/test_setops.py @@ -626,6 +626,10 @@ def test_union_with_duplicates_keep_ea_dtype(dupe_val, any_numeric_ea_dtype): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") def test_union_duplicates(index, request): + # special case for mixed types + if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + index = index.map(str) + # GH#38977 if index.empty or isinstance(index, (IntervalIndex, CategoricalIndex)): pytest.skip(f"No duplicates in an empty {type(index).__name__}") From af140a84de63125017ca444522744485f7d02b1b Mon Sep 17 00:00:00 2001 From: xaris96 Date: Wed, 23 Apr 2025 17:03:56 +0300 Subject: [PATCH 16/32] 2 test passed for mixed int string --- after.txt | 708 +------------------------- before.txt | 472 +---------------- pandas/tests/indexes/test_common.py | 8 + pandas/tests/indexes/test_old_base.py | 19 +- 4 files changed, 59 insertions(+), 1148 deletions(-) diff --git a/after.txt b/after.txt index b904b59583283..ad071887954f5 100644 --- a/after.txt +++ b/after.txt @@ -1,693 +1,23 @@ -+ meson compile -Activating VS 17.13.6 -INFO: automatically activated MSVC compiler environment -INFO: autodetecting backend as ninja -INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE -[1/1] Generating write_version_file with a custom command -============================= test session starts ============================= -platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 -rootdir: C:\Users\xaris\panda\pandas -configfile: pyproject.toml -plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 -collected 16743 items -pandas\tests\indexes\base_class\test_constructors.py ........... -pandas\tests\indexes\base_class\test_formats.py ............. -pandas\tests\indexes\base_class\test_indexing.py ............. -pandas\tests\indexes\base_class\test_pickle.py . -pandas\tests\indexes\base_class\test_reshape.py ...................... -pandas\tests\indexes\base_class\test_setops.py ............................................................ -pandas\tests\indexes\base_class\test_where.py . -pandas\tests\indexes\categorical\test_append.py ....... -pandas\tests\indexes\categorical\test_astype.py ........... -pandas\tests\indexes\categorical\test_category.py .......................................... -pandas\tests\indexes\categorical\test_constructors.py ..... -pandas\tests\indexes\categorical\test_equals.py ......... -pandas\tests\indexes\categorical\test_fillna.py ... -pandas\tests\indexes\categorical\test_formats.py . -pandas\tests\indexes\categorical\test_indexing.py ................................. -pandas\tests\indexes\categorical\test_map.py ..................... -pandas\tests\indexes\categorical\test_reindex.py ....... -pandas\tests\indexes\categorical\test_setops.py .. -pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ -pandas\tests\indexes\datetimelike_\test_equals.py ..................... -pandas\tests\indexes\datetimelike_\test_indexing.py ................ -pandas\tests\indexes\datetimelike_\test_is_monotonic.py . -pandas\tests\indexes\datetimelike_\test_nat.py .... -pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... -pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ -pandas\tests\indexes\datetimes\methods\test_asof.py .. -pandas\tests\indexes\datetimes\methods\test_astype.py ................................. -pandas\tests\indexes\datetimes\methods\test_delete.py ....................... -pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... -pandas\tests\indexes\datetimes\methods\test_fillna.py .. -pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. -pandas\tests\indexes\datetimes\methods\test_map.py ..... -pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss -pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ -pandas\tests\indexes\datetimes\methods\test_snap.py ........................ -pandas\tests\indexes\datetimes\methods\test_to_frame.py .. -pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... -pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ -pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. -pandas\tests\indexes\datetimes\methods\test_to_series.py . -pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... -pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. -pandas\tests\indexes\datetimes\methods\test_unique.py ........................ -pandas\tests\indexes\datetimes\test_arithmetic.py .....................x -pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ -pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ -pandas\tests\indexes\datetimes\test_datetime.py ...................... -pandas\tests\indexes\datetimes\test_formats.py ................................. -pandas\tests\indexes\datetimes\test_freq_attr.py .......................... -pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\test_iter.py ............ -pandas\tests\indexes\datetimes\test_join.py ...................... -pandas\tests\indexes\datetimes\test_npfuncs.py . -pandas\tests\indexes\datetimes\test_ops.py ................ -pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. -pandas\tests\indexes\datetimes\test_pickle.py ...... -pandas\tests\indexes\datetimes\test_reindex.py .. -pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ -pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... -pandas\tests\indexes\datetimes\test_timezones.py ........................................ -pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... -pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. -pandas\tests\indexes\interval\test_equals.py .... -pandas\tests\indexes\interval\test_formats.py ........... -pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ -pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. -pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. -pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... -pandas\tests\indexes\interval\test_join.py ... -pandas\tests\indexes\interval\test_pickle.py .... -pandas\tests\indexes\interval\test_setops.py ................................................................................. -pandas\tests\indexes\multi\test_analytics.py ...................................... -pandas\tests\indexes\multi\test_astype.py ... -pandas\tests\indexes\multi\test_compat.py ...... -pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... -pandas\tests\indexes\multi\test_conversion.py ........ -pandas\tests\indexes\multi\test_copy.py .......... -pandas\tests\indexes\multi\test_drop.py .............. -pandas\tests\indexes\multi\test_duplicates.py ................................................... -pandas\tests\indexes\multi\test_equivalence.py .............. -pandas\tests\indexes\multi\test_formats.py .......... -pandas\tests\indexes\multi\test_get_level_values.py ........ -pandas\tests\indexes\multi\test_get_set.py ................... -pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. -pandas\tests\indexes\multi\test_integrity.py ................. -pandas\tests\indexes\multi\test_isin.py .............. -pandas\tests\indexes\multi\test_join.py ....................................................... -pandas\tests\indexes\multi\test_lexsort.py .. -pandas\tests\indexes\multi\test_missing.py ...x.. -pandas\tests\indexes\multi\test_monotonic.py ........... -pandas\tests\indexes\multi\test_names.py ............................... -pandas\tests\indexes\multi\test_partial_indexing.py ..... -pandas\tests\indexes\multi\test_pickle.py . -pandas\tests\indexes\multi\test_reindex.py ............ -pandas\tests\indexes\multi\test_reshape.py ........... -pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss.........F...............................F......................F.... -pandas\tests\indexes\multi\test_sorting.py ........................... -pandas\tests\indexes\multi\test_take.py ... -pandas\tests\indexes\multi\test_util.py ............... -pandas\tests\indexes\numeric\test_astype.py ................... -pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... -pandas\tests\indexes\numeric\test_join.py ........... -pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... -pandas\tests\indexes\numeric\test_setops.py .................... -pandas\tests\indexes\object\test_astype.py . -pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... -pandas\tests\indexes\period\methods\test_asfreq.py ............... -pandas\tests\indexes\period\methods\test_astype.py ............. -pandas\tests\indexes\period\methods\test_factorize.py .. -pandas\tests\indexes\period\methods\test_fillna.py . -pandas\tests\indexes\period\methods\test_insert.py ... -pandas\tests\indexes\period\methods\test_is_full.py . -pandas\tests\indexes\period\methods\test_repeat.py ...... -pandas\tests\indexes\period\methods\test_shift.py ...... -pandas\tests\indexes\period\methods\test_to_timestamp.py ......... -pandas\tests\indexes\period\test_constructors.py ......................................................................................................... -pandas\tests\indexes\period\test_formats.py ..... -pandas\tests\indexes\period\test_freq_attr.py . -pandas\tests\indexes\period\test_indexing.py ......................................................................... -pandas\tests\indexes\period\test_join.py ........... -pandas\tests\indexes\period\test_monotonic.py .. -pandas\tests\indexes\period\test_partial_slicing.py .............. -pandas\tests\indexes\period\test_period.py .................................................................................................................................... -pandas\tests\indexes\period\test_period_range.py ........................... -pandas\tests\indexes\period\test_pickle.py .... -pandas\tests\indexes\period\test_resolution.py ......... -pandas\tests\indexes\period\test_scalar_compat.py ... -pandas\tests\indexes\period\test_searchsorted.py ........ -pandas\tests\indexes\period\test_setops.py .............. -pandas\tests\indexes\period\test_tools.py ............ -pandas\tests\indexes\ranges\test_constructors.py ............................. -pandas\tests\indexes\ranges\test_indexing.py ............... -pandas\tests\indexes\ranges\test_join.py .......................................... -pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ -pandas\tests\indexes\ranges\test_setops.py ................................................................... -pandas\tests\indexes\string\test_astype.py . -pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. -pandas\tests\indexes\test_any_index.py .............................................................................................s.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. -pandas\tests\indexes\test_base.py ............................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss............................................................................................................................ssss.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. -pandas\tests\indexes\test_common.py ................................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......................................................................................................................................sssssssss...s....ss.............................xs..........................sss................................................sss.................................................................................................s................s........................................................................................................................................................................................................................................................................................FF................FF..XX....FF....FF......................................... -pandas\tests\indexes\test_datetimelike.py ........................................ -pandas\tests\indexes\test_engines.py ......................................... -pandas\tests\indexes\test_frozen.py .......... -pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ -pandas\tests\indexes\test_indexing.py ..........................................................ss..................................s.............................................................................................................................................................................................................................................................................................................................................................................................s.......................... -pandas\tests\indexes\test_mixed_int_string.py . -pandas\tests\indexes\test_numpy_compat.py ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss..................FF..... -pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss...................................................................................................s...........F..................................F.............................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s....................................................s................s.................................s................................sssssssss...s....s...sss........................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... -pandas\tests\indexes\test_setops.py .................................F...............................F..................................................................................................................................................................................................................................................................................................................................................s..............................................F........................................................................................ss..s.s...s...s.F.......................................................................................................................................................................................................................................................................................................................FFFFF...........................................................................................................................................................................................................................................................................................................................FFFFF..........................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................s................................................................................................................................................................................................................ -pandas\tests\indexes\test_subclass.py . -pandas\tests\indexes\timedeltas\methods\test_astype.py ............... -pandas\tests\indexes\timedeltas\methods\test_factorize.py .. -pandas\tests\indexes\timedeltas\methods\test_fillna.py . -pandas\tests\indexes\timedeltas\methods\test_insert.py ............... -pandas\tests\indexes\timedeltas\methods\test_repeat.py . -pandas\tests\indexes\timedeltas\methods\test_shift.py ...... -pandas\tests\indexes\timedeltas\test_arithmetic.py ... -pandas\tests\indexes\timedeltas\test_constructors.py ........................ -pandas\tests\indexes\timedeltas\test_delete.py ... -pandas\tests\indexes\timedeltas\test_formats.py ..... -pandas\tests\indexes\timedeltas\test_freq_attr.py ........... -pandas\tests\indexes\timedeltas\test_indexing.py .................................... -pandas\tests\indexes\timedeltas\test_join.py ....... -pandas\tests\indexes\timedeltas\test_ops.py .......... -pandas\tests\indexes\timedeltas\test_pickle.py . -pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ -pandas\tests\indexes\timedeltas\test_searchsorted.py ........ -pandas\tests\indexes\timedeltas\test_setops.py ................................ -pandas\tests\indexes\timedeltas\test_timedelta.py ... -pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] - TypeError: '>=' not supported between instances of 'int' and 'str' +FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] - TypeError: '<=' not supported between instances of 'int' and 'str' +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-None-None] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-A-A] - TypeError: '<' not supported between instances of 'int' and 'str' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-B-None] - TypeError: '<' not supported between instances of 'int' and 'str' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-None-None] - TypeError: '<' not supported between instances of 'int' and 'str' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-B-None] - TypeError: '<' not supported between instances of 'int' and 'str' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-None-None] - TypeError: '<' not supported between instances of 'int' and 'str' -================================== FAILURES =================================== -________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ -pandas\tests\indexes\multi\test_setops.py:454: in test_difference_keep_ea_dtypes - [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ -pandas\tests\indexes\multi\test_setops.py:475: in test_symmetric_difference_keeping_ea_dtype - [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ -pandas\tests\indexes\multi\test_setops.py:607: in test_union_with_duplicates_keep_ea_dtype - Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -___________________ test_union_duplicates[mixed-int-string] ___________________ -pandas\core\indexes\multi.py:3916: in _union - result = result.sort_values() -pandas\core\indexes\base.py:5798: in sort_values - _as = idx.argsort(na_position=na_position) -pandas\core\indexes\multi.py:2403: in argsort - target = self._sort_levels_monotonic(raise_if_incomparable=True) -pandas\core\indexes\multi.py:2101: in _sort_levels_monotonic - indexer = lev.argsort() -pandas\core\indexes\base.py:5907: in argsort - return self._data.argsort(*args, **kwargs) -E TypeError: '<' not supported between instances of 'str' and 'int' -During handling of the above exception, another exception occurred: -pandas\tests\indexes\multi\test_setops.py:636: in test_union_duplicates - result = mi2.union(mi1) -pandas\core\indexes\base.py:3098: in union - result = self._union(other, sort=sort) -pandas\core\indexes\multi.py:3920: in _union - warnings.warn( -E RuntimeWarning: The values in the array are unorderable. Pass `sort=False` to suppress this warning. -__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ -pandas\tests\indexes\multi\test_setops.py:679: in test_union_keep_ea_dtype_with_na - arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ -pandas\tests\indexes\multi\test_setops.py:748: in test_intersection_keep_ea_dtypes - [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ -pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked - idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ -pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked - idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ -pandas\tests\indexes\numeric\test_indexing.py:330: in test_get_loc_masked_na - idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ -pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na - idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ -pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na - idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_________ test_sort_values_invalid_na_position[mixed-int-string-None] _________ -pandas\tests\indexes\test_common.py:444: in test_sort_values_invalid_na_position - index_with_missing.sort_values(na_position=na_position) -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'int' and 'str' -________ test_sort_values_invalid_na_position[mixed-int-string-middle] ________ -pandas\tests\indexes\test_common.py:444: in test_sort_values_invalid_na_position - index_with_missing.sort_values(na_position=na_position) -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'int' and 'str' -_______________ test_sort_values_with_missing[complex64-first] ________________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:630: in sanitize_array - subarr = _try_cast(data, dtype, copy) -pandas\core\construction.py:831: in _try_cast - subarr = np.asarray(arr, dtype=dtype) -E RuntimeWarning: invalid value encountered in cast -________________ test_sort_values_with_missing[complex64-last] ________________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:630: in sanitize_array - subarr = _try_cast(data, dtype, copy) -pandas\core\construction.py:831: in _try_cast - subarr = np.asarray(arr, dtype=dtype) -E RuntimeWarning: invalid value encountered in cast -_____________ test_sort_values_with_missing[nullable_float-first] _____________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_____________ test_sort_values_with_missing[nullable_float-last] ______________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -____________ test_sort_values_with_missing[mixed-int-string-first] ____________ -pandas\tests\indexes\test_common.py:462: in test_sort_values_with_missing - sorted_values = np.sort(not_na_vals) -env\Lib\site-packages\numpy\core\fromnumeric.py:1017: in sort - a.sort(axis=axis, kind=kind, order=order) -E TypeError: '<' not supported between instances of 'int' and 'str' -____________ test_sort_values_with_missing[mixed-int-string-last] _____________ -pandas\tests\indexes\test_common.py:462: in test_sort_values_with_missing - sorted_values = np.sort(not_na_vals) -env\Lib\site-packages\numpy\core\fromnumeric.py:1017: in sort - a.sort(axis=axis, kind=kind, order=order) -E TypeError: '<' not supported between instances of 'int' and 'str' -___________ test_numpy_ufuncs_reductions[mixed-int-string-maximum] ____________ -pandas\tests\indexes\test_numpy_compat.py:164: in test_numpy_ufuncs_reductions - result = func.reduce(index) -pandas\core\indexes\base.py:939: in __array_ufunc__ - result = arraylike.dispatch_reduction_ufunc( -pandas\core\arraylike.py:530: in dispatch_reduction_ufunc - return getattr(self, method_name)(skipna=False, **kwargs) -pandas\core\indexes\base.py:7451: in max - return nanops.nanmax(self._values, skipna=skipna) -pandas\core\nanops.py:149: in f - result = alt(values, axis=axis, skipna=skipna, **kwds) -pandas\core\nanops.py:406: in new_func - result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs) -pandas\core\nanops.py:1100: in reduction - result = getattr(values, meth)(axis) -env\Lib\site-packages\numpy\core\_methods.py:41: in _amax - return umr_maximum(a, axis, None, out, keepdims, initial, where) -E TypeError: '>=' not supported between instances of 'int' and 'str' -___________ test_numpy_ufuncs_reductions[mixed-int-string-minimum] ____________ -pandas\tests\indexes\test_numpy_compat.py:164: in test_numpy_ufuncs_reductions - result = func.reduce(index) -pandas\core\indexes\base.py:939: in __array_ufunc__ - result = arraylike.dispatch_reduction_ufunc( -pandas\core\arraylike.py:530: in dispatch_reduction_ufunc - return getattr(self, method_name)(skipna=False, **kwargs) -pandas\core\indexes\base.py:7387: in min - return nanops.nanmin(self._values, skipna=skipna) -pandas\core\nanops.py:149: in f - result = alt(values, axis=axis, skipna=skipna, **kwds) -pandas\core\nanops.py:406: in new_func - result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs) -pandas\core\nanops.py:1100: in reduction - result = getattr(values, meth)(axis) -env\Lib\site-packages\numpy\core\_methods.py:45: in _amin - return umr_minimum(a, axis, None, out, keepdims, initial, where) -E TypeError: '<=' not supported between instances of 'int' and 'str' -___________________ TestBase.test_argsort[mixed-int-string] ___________________ -pandas\tests\indexes\test_old_base.py:361: in test_argsort - result = index.argsort() -pandas\core\indexes\base.py:5907: in argsort - return self._data.argsort(*args, **kwargs) -E TypeError: '<' not supported between instances of 'str' and 'int' -________________ TestBase.test_numpy_argsort[mixed-int-string] ________________ -env\Lib\site-packages\numpy\core\fromnumeric.py:59: in _wrapfunc - return bound(*args, **kwds) -pandas\core\indexes\base.py:5907: in argsort - return self._data.argsort(*args, **kwargs) -E TypeError: '<' not supported between instances of 'str' and 'int' -During handling of the above exception, another exception occurred: -pandas\tests\indexes\test_old_base.py:366: in test_numpy_argsort - result = np.argsort(index) -env\Lib\site-packages\numpy\core\fromnumeric.py:1133: in argsort - return _wrapfunc(a, 'argsort', axis=axis, kind=kind, order=order) -env\Lib\site-packages\numpy\core\fromnumeric.py:68: in _wrapfunc - return _wrapit(obj, method, *args, **kwds) -env\Lib\site-packages\numpy\core\fromnumeric.py:45: in _wrapit - result = getattr(asarray(obj), method)(*args, **kwds) -E TypeError: '<' not supported between instances of 'str' and 'int' -___________________ test_union_same_types[mixed-int-string] ___________________ -pandas\tests\indexes\test_setops.py:68: in test_union_same_types - idx1 = index.sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -________________ test_union_different_types[mixed-int-string] _________________ -pandas\tests\indexes\test_setops.py:132: in test_union_different_types - idx1 = idx1.sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -________________ TestSetOps.test_union_base[mixed-int-string] _________________ -pandas\tests\indexes\test_setops.py:257: in test_union_base - tm.assert_index_equal(union.sort_values(), everything.sort_values()) -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -___________ TestSetOps.test_symmetric_difference[mixed-int-string] ____________ -pandas\tests\indexes\test_setops.py:322: in test_symmetric_difference - tm.assert_index_equal(result.sort_values(), answer.sort_values()) -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -____________ TestSetOps.test_union_unequal[mixed-int-string-A-A-A] ____________ -pandas\tests\indexes\test_setops.py:401: in test_union_unequal - union = first.union(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -__________ TestSetOps.test_union_unequal[mixed-int-string-A-B-None] ___________ -pandas\tests\indexes\test_setops.py:401: in test_union_unequal - union = first.union(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -_________ TestSetOps.test_union_unequal[mixed-int-string-A-None-None] _________ -pandas\tests\indexes\test_setops.py:401: in test_union_unequal - union = first.union(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -_________ TestSetOps.test_union_unequal[mixed-int-string-None-B-None] _________ -pandas\tests\indexes\test_setops.py:401: in test_union_unequal - union = first.union(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -_______ TestSetOps.test_union_unequal[mixed-int-string-None-None-None] ________ -pandas\tests\indexes\test_setops.py:401: in test_union_unequal - union = first.union(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'str' and 'int' -__________ TestSetOps.test_intersect_unequal[mixed-int-string-A-A-A] __________ -pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal - intersect = first.intersection(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'int' and 'str' -________ TestSetOps.test_intersect_unequal[mixed-int-string-A-B-None] _________ -pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal - intersect = first.intersection(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'int' and 'str' -_______ TestSetOps.test_intersect_unequal[mixed-int-string-A-None-None] _______ -pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal - intersect = first.intersection(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'int' and 'str' -_______ TestSetOps.test_intersect_unequal[mixed-int-string-None-B-None] _______ -pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal - intersect = first.intersection(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'int' and 'str' -_____ TestSetOps.test_intersect_unequal[mixed-int-string-None-None-None] ______ -pandas\tests\indexes\test_setops.py:470: in test_intersect_unequal - intersect = first.intersection(second).sort_values() -pandas\core\indexes\base.py:5793: in sort_values - _as = nargsort( -pandas\core\sorting.py:438: in nargsort - indexer = non_nan_idx[non_nans.argsort(kind=kind)] -E TypeError: '<' not supported between instances of 'int' and 'str' --------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- -============================ slowest 30 durations ============================= -0.48s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] -0.34s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning -0.26s call pandas/tests/indexes/test_old_base.py::TestBase::test_map[simple_index4] -0.23s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds -0.18s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] -0.14s call pandas/tests/indexes/interval/test_indexing.py::TestGetLoc::test_get_loc_scalar[both-3.5] -0.11s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference -0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] -0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] -0.09s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] -0.08s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric -0.07s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning -0.06s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] -0.05s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst -0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] -0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] -0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] -0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] -0.04s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] -0.04s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] -0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] -0.04s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] -0.03s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz1] -0.03s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] -=========================== short test summary info =========================== -FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] -FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] -FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] -FAILED pandas/tests/indexes/multi/test_setops.py::test_union_duplicates[mixed-int-string] -FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] -FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last] -FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] -FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] -FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] -FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] -FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] -FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-None-None] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-A-A] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-B-None] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-None-None] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-B-None] -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-None-None] -==== 37 failed, 16435 passed, 221 skipped, 47 xfailed, 3 xpassed in 31.64s ==== +================================================ 32 failed, 16436 passed, 221 skipped, 51 xfailed, 3 xpassed in 37.47s ================================================ diff --git a/before.txt b/before.txt index ad3df2b6cadc8..9597b75bbb3d9 100644 --- a/before.txt +++ b/before.txt @@ -1,458 +1,14 @@ -+ meson compile -Activating VS 17.13.6 -INFO: automatically activated MSVC compiler environment -INFO: autodetecting backend as ninja -INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE -[1/7] Generating write_version_file with a custom command -[2/7] Compiling Cython source C:/Users/xaris/panda/pandas/pandas/_libs/tslibs/timestamps.pyx -[3/7] Compiling Cython source C:/Users/xaris/panda/pandas/pandas/_libs/algos.pyx -[4/7] Compiling C object pandas/_libs/tslibs/timestamps.cp313-win_amd64.pyd.p/meson-generated_pandas__libs_tslibs_timestamps.pyx.c.obj -[5/7] Linking target pandas/_libs/tslibs/timestamps.cp313-win_amd64.pyd - Creating library pandas\_libs\tslibs\timestamps.cp313-win_amd64.lib and object pandas\_libs\tslibs\timestamps.cp313-win_amd64.exp -[6/7] Compiling C object pandas/_libs/algos.cp313-win_amd64.pyd.p/meson-generated_pandas__libs_algos.pyx.c.obj -[7/7] Linking target pandas/_libs/algos.cp313-win_amd64.pyd - Creating library pandas\_libs\algos.cp313-win_amd64.lib and object pandas\_libs\algos.cp313-win_amd64.exp -============================= test session starts ============================= -platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 -rootdir: C:\Users\xaris\panda\pandas -configfile: pyproject.toml -plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 -collected 16548 items - -pandas\tests\indexes\base_class\test_constructors.py ........... -pandas\tests\indexes\base_class\test_formats.py ............. -pandas\tests\indexes\base_class\test_indexing.py ............. -pandas\tests\indexes\base_class\test_pickle.py . -pandas\tests\indexes\base_class\test_reshape.py ...................... -pandas\tests\indexes\base_class\test_setops.py ............................................................ -pandas\tests\indexes\base_class\test_where.py . -pandas\tests\indexes\categorical\test_append.py ....... -pandas\tests\indexes\categorical\test_astype.py ........... -pandas\tests\indexes\categorical\test_category.py .......................................... -pandas\tests\indexes\categorical\test_constructors.py ..... -pandas\tests\indexes\categorical\test_equals.py ......... -pandas\tests\indexes\categorical\test_fillna.py ... -pandas\tests\indexes\categorical\test_formats.py . -pandas\tests\indexes\categorical\test_indexing.py ................................. -pandas\tests\indexes\categorical\test_map.py ..................... -pandas\tests\indexes\categorical\test_reindex.py ....... -pandas\tests\indexes\categorical\test_setops.py .. -pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ -pandas\tests\indexes\datetimelike_\test_equals.py ..................... -pandas\tests\indexes\datetimelike_\test_indexing.py ................ -pandas\tests\indexes\datetimelike_\test_is_monotonic.py . -pandas\tests\indexes\datetimelike_\test_nat.py .... -pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... -pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ -pandas\tests\indexes\datetimes\methods\test_asof.py .. -pandas\tests\indexes\datetimes\methods\test_astype.py ................................. -pandas\tests\indexes\datetimes\methods\test_delete.py ....................... -pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... -pandas\tests\indexes\datetimes\methods\test_fillna.py .. -pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. -pandas\tests\indexes\datetimes\methods\test_map.py ..... -pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss -pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ -pandas\tests\indexes\datetimes\methods\test_snap.py ........................ -pandas\tests\indexes\datetimes\methods\test_to_frame.py .. -pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... -pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ -pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. -pandas\tests\indexes\datetimes\methods\test_to_series.py . -pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... -pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. -pandas\tests\indexes\datetimes\methods\test_unique.py ........................ -pandas\tests\indexes\datetimes\test_arithmetic.py .....................x -pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ -pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ -pandas\tests\indexes\datetimes\test_datetime.py ...................... -pandas\tests\indexes\datetimes\test_formats.py ................................. -pandas\tests\indexes\datetimes\test_freq_attr.py .......................... -pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... -pandas\tests\indexes\datetimes\test_iter.py ............ -pandas\tests\indexes\datetimes\test_join.py ...................... -pandas\tests\indexes\datetimes\test_npfuncs.py . -pandas\tests\indexes\datetimes\test_ops.py ................ -pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. -pandas\tests\indexes\datetimes\test_pickle.py ...... -pandas\tests\indexes\datetimes\test_reindex.py .. -pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ -pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... -pandas\tests\indexes\datetimes\test_timezones.py ........................................ -pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... -pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. -pandas\tests\indexes\interval\test_equals.py .... -pandas\tests\indexes\interval\test_formats.py ........... -pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ -pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. -pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. -pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... -pandas\tests\indexes\interval\test_join.py ... -pandas\tests\indexes\interval\test_pickle.py .... -pandas\tests\indexes\interval\test_setops.py ................................................................................. -pandas\tests\indexes\multi\test_analytics.py ...................................... -pandas\tests\indexes\multi\test_astype.py ... -pandas\tests\indexes\multi\test_compat.py ...... -pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... -pandas\tests\indexes\multi\test_conversion.py ........ -pandas\tests\indexes\multi\test_copy.py .......... -pandas\tests\indexes\multi\test_drop.py .............. -pandas\tests\indexes\multi\test_duplicates.py ................................................... -pandas\tests\indexes\multi\test_equivalence.py .............. -pandas\tests\indexes\multi\test_formats.py .......... -pandas\tests\indexes\multi\test_get_level_values.py ........ -pandas\tests\indexes\multi\test_get_set.py ................... -pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. -pandas\tests\indexes\multi\test_integrity.py ................. -pandas\tests\indexes\multi\test_isin.py .............. -pandas\tests\indexes\multi\test_join.py ....................................................... -pandas\tests\indexes\multi\test_lexsort.py .. -pandas\tests\indexes\multi\test_missing.py ...x.. -pandas\tests\indexes\multi\test_monotonic.py ........... -pandas\tests\indexes\multi\test_names.py ............................... -pandas\tests\indexes\multi\test_partial_indexing.py ..... -pandas\tests\indexes\multi\test_pickle.py . -pandas\tests\indexes\multi\test_reindex.py ............ -pandas\tests\indexes\multi\test_reshape.py ........... -pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss........................................F......................F.... -pandas\tests\indexes\multi\test_sorting.py ........................... -pandas\tests\indexes\multi\test_take.py ... -pandas\tests\indexes\multi\test_util.py ............... -pandas\tests\indexes\numeric\test_astype.py ................... -pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... -pandas\tests\indexes\numeric\test_join.py ........... -pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... -pandas\tests\indexes\numeric\test_setops.py .................... -pandas\tests\indexes\object\test_astype.py . -pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... -pandas\tests\indexes\period\methods\test_asfreq.py ............... -pandas\tests\indexes\period\methods\test_astype.py ............. -pandas\tests\indexes\period\methods\test_factorize.py .. -pandas\tests\indexes\period\methods\test_fillna.py . -pandas\tests\indexes\period\methods\test_insert.py ... -pandas\tests\indexes\period\methods\test_is_full.py . -pandas\tests\indexes\period\methods\test_repeat.py ...... -pandas\tests\indexes\period\methods\test_shift.py ...... -pandas\tests\indexes\period\methods\test_to_timestamp.py ......... -pandas\tests\indexes\period\test_constructors.py ......................................................................................................... -pandas\tests\indexes\period\test_formats.py ..... -pandas\tests\indexes\period\test_freq_attr.py . -pandas\tests\indexes\period\test_indexing.py ......................................................................... -pandas\tests\indexes\period\test_join.py ........... -pandas\tests\indexes\period\test_monotonic.py .. -pandas\tests\indexes\period\test_partial_slicing.py .............. -pandas\tests\indexes\period\test_period.py .................................................................................................................................... -pandas\tests\indexes\period\test_period_range.py ........................... -pandas\tests\indexes\period\test_pickle.py .... -pandas\tests\indexes\period\test_resolution.py ......... -pandas\tests\indexes\period\test_scalar_compat.py ... -pandas\tests\indexes\period\test_searchsorted.py ........ -pandas\tests\indexes\period\test_setops.py .............. -pandas\tests\indexes\period\test_tools.py ............ -pandas\tests\indexes\ranges\test_constructors.py ............................. -pandas\tests\indexes\ranges\test_indexing.py ............... -pandas\tests\indexes\ranges\test_join.py .......................................... -pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ -pandas\tests\indexes\ranges\test_setops.py ................................................................... -pandas\tests\indexes\string\test_astype.py . -pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. -pandas\tests\indexes\test_any_index.py ...........................................................................................s............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -pandas\tests\indexes\test_base.py ...........................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss.........................................................................................................................ssss................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... -pandas\tests\indexes\test_common.py .........................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..................................................................................................................................sssssssss...s....ss............................xs.........................sss................................................sss............................................................................................s................s................................................................................................................................................................................................................................................................................................FF..XX....FF............................................ -pandas\tests\indexes\test_datetimelike.py ........................................ -pandas\tests\indexes\test_engines.py ......................................... -pandas\tests\indexes\test_frozen.py .......... -pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ -pandas\tests\indexes\test_indexing.py .........................................................ss.................................s...................................................................................................................................................................................................................................................................................................................................................................................s......................... -pandas\tests\indexes\test_mixed_int_string.py . -pandas\tests\indexes\test_numpy_compat.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss....................... -pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss................................................................................................s..........................................................................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s..................................................s................s................................s...............................sssssssss...s....s...sss......................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... -pandas\tests\indexes\test_setops.py ..........................................................................................................................................................................................................................................................................................................................................................................................................s...................................................................................................................................ss..s.s...s...s..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss....................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss...................................................................................................................................................................................................................................................................................s............................................................................................................................................................................................................. -pandas\tests\indexes\test_subclass.py . -pandas\tests\indexes\timedeltas\methods\test_astype.py ............... -pandas\tests\indexes\timedeltas\methods\test_factorize.py .. -pandas\tests\indexes\timedeltas\methods\test_fillna.py . -pandas\tests\indexes\timedeltas\methods\test_insert.py ............... -pandas\tests\indexes\timedeltas\methods\test_repeat.py . -pandas\tests\indexes\timedeltas\methods\test_shift.py ...... -pandas\tests\indexes\timedeltas\test_arithmetic.py ... -pandas\tests\indexes\timedeltas\test_constructors.py ........................ -pandas\tests\indexes\timedeltas\test_delete.py ... -pandas\tests\indexes\timedeltas\test_formats.py ..... -pandas\tests\indexes\timedeltas\test_freq_attr.py ........... -pandas\tests\indexes\timedeltas\test_indexing.py .................................... -pandas\tests\indexes\timedeltas\test_join.py ....... -pandas\tests\indexes\timedeltas\test_ops.py .......... -pandas\tests\indexes\timedeltas\test_pickle.py . -pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ -pandas\tests\indexes\timedeltas\test_searchsorted.py ........ -pandas\tests\indexes\timedeltas\test_setops.py ................................ -pandas\tests\indexes\timedeltas\test_timedelta.py ... -pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. - -================================== FAILURES =================================== -________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ -pandas\tests\indexes\multi\test_setops.py:454: in test_difference_keep_ea_dtypes - [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ -pandas\tests\indexes\multi\test_setops.py:475: in test_symmetric_difference_keeping_ea_dtype - [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ -pandas\tests\indexes\multi\test_setops.py:607: in test_union_with_duplicates_keep_ea_dtype - Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ -pandas\tests\indexes\multi\test_setops.py:679: in test_union_keep_ea_dtype_with_na - arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ -pandas\tests\indexes\multi\test_setops.py:748: in test_intersection_keep_ea_dtypes - [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] -pandas\core\series.py:507: in __init__ - data = sanitize_array(data, index, dtype, copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ -pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked - idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ -pandas\tests\indexes\numeric\test_indexing.py:321: in test_get_loc_masked - idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ -pandas\tests\indexes\numeric\test_indexing.py:330: in test_get_loc_masked_na - idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ -pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na - idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ -pandas\tests\indexes\numeric\test_indexing.py:375: in test_get_indexer_masked_na - idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_______________ test_sort_values_with_missing[complex64-first] ________________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:630: in sanitize_array - subarr = _try_cast(data, dtype, copy) -pandas\core\construction.py:831: in _try_cast - subarr = np.asarray(arr, dtype=dtype) -E RuntimeWarning: invalid value encountered in cast -________________ test_sort_values_with_missing[complex64-last] ________________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:630: in sanitize_array - subarr = _try_cast(data, dtype, copy) -pandas\core\construction.py:831: in _try_cast - subarr = np.asarray(arr, dtype=dtype) -E RuntimeWarning: invalid value encountered in cast -_____________ test_sort_values_with_missing[nullable_float-first] _____________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast -_____________ test_sort_values_with_missing[nullable_float-last] ______________ -pandas\tests\indexes\test_common.py:469: in test_sort_values_with_missing - expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) -pandas\core\indexes\base.py:571: in __new__ - arr = sanitize_array(data, None, dtype=dtype, copy=copy) -pandas\core\construction.py:605: in sanitize_array - subarr = cls._from_sequence(data, dtype=dtype, copy=copy) -pandas\core\arrays\masked.py:145: in _from_sequence - values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) -pandas\core\arrays\numeric.py:281: in _coerce_to_array - values, mask, _, _ = _coerce_to_data_and_mask( -pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask - values = dtype_cls._safe_cast(values, dtype, copy=False) -pandas\core\arrays\floating.py:55: in _safe_cast - return values.astype(dtype, copy=copy) -E RuntimeWarning: invalid value encountered in cast --------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- -============================ slowest 30 durations ============================= -0.51s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] -0.35s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning -0.27s call pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[int8-None-None-None] -0.24s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds -0.18s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] -0.13s call pandas/tests/indexes/interval/test_indexing.py::TestGetIndexer::test_get_indexer_with_int_and_float[query6-expected6] -0.12s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] -0.11s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference -0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] -0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] -0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] -0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] -0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] -0.10s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] -0.09s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric -0.08s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] -0.07s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning -0.06s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst -0.06s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] -0.05s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] -0.05s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] -0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] -0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] -0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] -0.04s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] -0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] -0.04s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] -0.04s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip['Asia/Tokyo'] -0.04s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] -=========================== short test summary info =========================== -FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] -FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] -FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] -FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] -FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] -FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] -==== 14 failed, 16264 passed, 221 skipped, 46 xfailed, 3 xpassed in 30.02s ==== +FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] - RuntimeWarning: invalid value encountered in cast +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] - RuntimeWarning: invalid value encountered in cast diff --git a/pandas/tests/indexes/test_common.py b/pandas/tests/indexes/test_common.py index bf16554871efc..e04264a457b06 100644 --- a/pandas/tests/indexes/test_common.py +++ b/pandas/tests/indexes/test_common.py @@ -440,6 +440,10 @@ def test_hasnans_isnans(self, index_flat): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") @pytest.mark.parametrize("na_position", [None, "middle"]) def test_sort_values_invalid_na_position(index_with_missing, na_position): + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + with pytest.raises(ValueError, match=f"invalid na_position: {na_position}"): index_with_missing.sort_values(na_position=na_position) @@ -450,6 +454,10 @@ def test_sort_values_with_missing(index_with_missing, na_position, request): # GH 35584. Test that sort_values works with missing values, # sort non-missing and place missing according to na_position + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + if isinstance(index_with_missing, CategoricalIndex): request.applymarker( pytest.mark.xfail( diff --git a/pandas/tests/indexes/test_old_base.py b/pandas/tests/indexes/test_old_base.py index 5f36b8c3f5dbf..d1f89e7507a32 100644 --- a/pandas/tests/indexes/test_old_base.py +++ b/pandas/tests/indexes/test_old_base.py @@ -358,11 +358,29 @@ def test_argsort(self, index): if isinstance(index, CategoricalIndex): pytest.skip(f"{type(self).__name__} separately tested") + # New test for mixed-int-string + if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + result = index.astype(str).argsort() + expected = np.array(index.astype(str)).argsort() + tm.assert_numpy_array_equal(result, expected, check_dtype=False) + return + result = index.argsort() expected = np.array(index).argsort() tm.assert_numpy_array_equal(result, expected, check_dtype=False) def test_numpy_argsort(self, index): + # new test for mixed-int-string + if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + result = np.argsort(index.astype(str)) + expected = index.astype(str).argsort() + tm.assert_numpy_array_equal(result, expected) + + result = np.argsort(index.astype(str), kind="mergesort") + expected = index.astype(str).argsort(kind="mergesort") + tm.assert_numpy_array_equal(result, expected) + return + result = np.argsort(index) expected = index.argsort() tm.assert_numpy_array_equal(result, expected) @@ -370,7 +388,6 @@ def test_numpy_argsort(self, index): result = np.argsort(index, kind="mergesort") expected = index.argsort(kind="mergesort") tm.assert_numpy_array_equal(result, expected) - # these are the only two types that perform # pandas compatibility input validation - the # rest already perform separate (or no) such From 8992100c3a97f65fcad3133eeaddaedefc9a1fed Mon Sep 17 00:00:00 2001 From: xaris96 Date: Thu, 24 Apr 2025 14:25:57 +0300 Subject: [PATCH 17/32] test_union_same_type mixed int string --- after.txt | 7 +++++-- pandas/tests/indexes/test_setops.py | 11 ++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/after.txt b/after.txt index ad071887954f5..cfbacc3f61bf6 100644 --- a/after.txt +++ b/after.txt @@ -1,8 +1,8 @@ FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] - TypeError: '>=' not supported between instances of 'int' and 'str' FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] - TypeError: '<=' not supported between instances of 'int' and 'str' -FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' -FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' @@ -20,4 +20,7 @@ FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[m + + + ================================================ 32 failed, 16436 passed, 221 skipped, 51 xfailed, 3 xpassed in 37.47s ================================================ diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 7cc74f4b3405c..6c734c4b2d059 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -5,7 +5,7 @@ from datetime import datetime import operator - +import pandas as pd import numpy as np import pytest @@ -63,12 +63,13 @@ def index_flat2(index_flat): def test_union_same_types(index): - # Union with a non-unique, non-monotonic index raises error - # Only needed for bool index factory + # mixed int string + if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + index = index.astype(str) + idx1 = index.sort_values() idx2 = index.sort_values() - assert idx1.union(idx2).dtype == idx1.dtype - + assert idx1.union(idx2, sort=False).dtype == idx1.dtype def test_union_different_types(index_flat, index_flat2, request): # This test only considers combinations of indices From 1fe92f9580da5d41be64820ad607e7dba30d9c5a Mon Sep 17 00:00:00 2001 From: xaris96 Date: Thu, 24 Apr 2025 14:48:58 +0300 Subject: [PATCH 18/32] test_union_different_types mixed int string fixed --- pandas/tests/indexes/test_setops.py | 33 ++++++----------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 6c734c4b2d059..545131d351a86 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -72,32 +72,13 @@ def test_union_same_types(index): assert idx1.union(idx2, sort=False).dtype == idx1.dtype def test_union_different_types(index_flat, index_flat2, request): - # This test only considers combinations of indices - # GH 23525 idx1 = index_flat idx2 = index_flat2 - if ( - not idx1.is_unique - and not idx2.is_unique - and idx1.dtype.kind == "i" - and idx2.dtype.kind == "b" - ) or ( - not idx2.is_unique - and not idx1.is_unique - and idx2.dtype.kind == "i" - and idx1.dtype.kind == "b" - ): - # Each condition had idx[1|2].is_monotonic_decreasing - # but failed when e.g. - # idx1 = Index( - # [True, True, True, True, True, True, True, True, False, False], dtype='bool' - # ) - # idx2 = Index([0, 0, 1, 1, 2, 2], dtype='int64') - mark = pytest.mark.xfail( - reason="GH#44000 True==1", raises=ValueError, strict=False - ) - request.applymarker(mark) + # Ειδική μεταχείριση για mixed-int-string + if idx1.equals(pd.Index([0, "a", 1, "b", 2, "c"])) or idx2.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + idx1 = idx1.astype(str) + idx2 = idx2.astype(str) common_dtype = find_common_type([idx1.dtype, idx2.dtype]) @@ -108,7 +89,6 @@ def test_union_different_types(index_flat, index_flat2, request): elif (idx1.dtype.kind == "c" and (not lib.is_np_dtype(idx2.dtype, "iufc"))) or ( idx2.dtype.kind == "c" and (not lib.is_np_dtype(idx1.dtype, "iufc")) ): - # complex objects non-sortable warn = RuntimeWarning elif ( isinstance(idx1.dtype, PeriodDtype) and isinstance(idx2.dtype, CategoricalDtype) @@ -134,8 +114,8 @@ def test_union_different_types(index_flat, index_flat2, request): idx2 = idx2.sort_values() with tm.assert_produces_warning(warn, match=msg): - res1 = idx1.union(idx2) - res2 = idx2.union(idx1) + res1 = idx1.union(idx2, sort=False) + res2 = idx2.union(idx1, sort=False) if any_uint64 and (idx1_signed or idx2_signed): assert res1.dtype == np.dtype("O") @@ -144,7 +124,6 @@ def test_union_different_types(index_flat, index_flat2, request): assert res1.dtype == common_dtype assert res2.dtype == common_dtype - @pytest.mark.parametrize( "idx1,idx2", [ From 599df6dc3bc7733899269f7316c5ce8a98fe8402 Mon Sep 17 00:00:00 2001 From: xaris96 Date: Thu, 24 Apr 2025 15:58:15 +0300 Subject: [PATCH 19/32] test_union_base mixed int string test fail fixed --- after.txt | 4 ++-- pandas/tests/indexes/test_setops.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/after.txt b/after.txt index cfbacc3f61bf6..3674d02ba6ce4 100644 --- a/after.txt +++ b/after.txt @@ -3,8 +3,8 @@ FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[m FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] - TypeError: '<=' not supported between instances of 'int' and 'str' DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' -FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' -FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +DONE FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +DONE FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] - TypeError: '<' not supported between instances of 'str' and 'int' diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 545131d351a86..a684dfdd2bc5c 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -229,11 +229,17 @@ def test_intersection_base(self, index): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") def test_union_base(self, index): index = index.unique() + + # Mixed int string + if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + index = index.astype(str) + first = index[3:] second = index[:5] everything = index - union = first.union(second) + # Default sort=None + union = first.union(second, sort=None) tm.assert_index_equal(union.sort_values(), everything.sort_values()) if isinstance(index.dtype, DatetimeTZDtype): @@ -244,7 +250,7 @@ def test_union_base(self, index): # GH#10149 cases = [second.to_numpy(), second.to_series(), second.to_list()] for case in cases: - result = first.union(case) + result = first.union(case, sort=None) assert equal_contents(result, everything) if isinstance(index, MultiIndex): From 3256953c9b9aeec6f1c6f8c653f0d7041447236b Mon Sep 17 00:00:00 2001 From: xaris96 Date: Thu, 24 Apr 2025 16:13:45 +0300 Subject: [PATCH 20/32] total 5 tests fixed and 2 made xfailed --- after.txt | 16 +++++++++------- before.txt | 2 ++ failed_after.txt | 5 ++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/after.txt b/after.txt index 3674d02ba6ce4..738ca614613cd 100644 --- a/after.txt +++ b/after.txt @@ -1,13 +1,16 @@ - +XFAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] +XFAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] +XFAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first] +XFAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last] FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] - TypeError: '>=' not supported between instances of 'int' and 'str' FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] - TypeError: '<=' not supported between instances of 'int' and 'str' -DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' -DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' DONE FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' DONE FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' -FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] - TypeError: '<' not supported between instances of 'str' and 'int' +DONE FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int' +FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] - TypeError: '<' not supported between instances of 'str' and 'int' FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] - TypeError: '<' not supported between instances of 'str' and 'int' @@ -22,5 +25,4 @@ FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[m - ================================================ 32 failed, 16436 passed, 221 skipped, 51 xfailed, 3 xpassed in 37.47s ================================================ diff --git a/before.txt b/before.txt index 9597b75bbb3d9..435b2c1136fa9 100644 --- a/before.txt +++ b/before.txt @@ -12,3 +12,5 @@ FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[comple FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] - RuntimeWarning: invalid value encountered in cast FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] - RuntimeWarning: invalid value encountered in cast FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] - RuntimeWarning: invalid value encountered in cast + + diff --git a/failed_after.txt b/failed_after.txt index f62a173098972..4eb8189c8157b 100644 --- a/failed_after.txt +++ b/failed_after.txt @@ -1,6 +1,5 @@ -FAILED pandas/tests/indexes/multi/test_setops.py::test_union_duplicates[mixed-int-string] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] -FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None] xfail +FAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle] xfail FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first] FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last] FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] From c8567996def502c160b0fd2db405dbf99f5ea00c Mon Sep 17 00:00:00 2001 From: xaris96 Date: Thu, 24 Apr 2025 18:17:06 +0300 Subject: [PATCH 21/32] all tests passed! --- pandas/tests/indexes/test_setops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index d92857a7b34ed..9223b40cae8fc 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -306,8 +306,8 @@ def test_symmetric_difference(self, index, using_infer_string, request): # index fixture has e.g. an index of bools that does not satisfy this, # another with [0, 0, 1, 1, 2, 2] pytest.skip("Index values no not satisfy test condition.") - - + if index.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + index = index.astype(str) first = index[1:] second = index[:-1] answer = index[[0, -1]] From ed90c56f6d6ca18146aec96240789009f51b541a Mon Sep 17 00:00:00 2001 From: xaris96 Date: Thu, 24 Apr 2025 18:30:42 +0300 Subject: [PATCH 22/32] merged --- AfterMixed.txt | 1008 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1008 insertions(+) create mode 100644 AfterMixed.txt diff --git a/AfterMixed.txt b/AfterMixed.txt new file mode 100644 index 0000000000000..947ee6a8cee08 --- /dev/null +++ b/AfterMixed.txt @@ -0,0 +1,1008 @@ ++ meson compile +Activating VS 17.13.6 +INFO: automatically activated MSVC compiler environment +INFO: autodetecting backend as ninja +INFO: calculating backend command to run: C:\Users\xaris\panda\pandas\env\Scripts\ninja.EXE +[1/1] Generating write_version_file with a custom command +============================= test session starts ============================= +platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 +PyQt5 5.15.11 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2 +rootdir: C:\Users\xaris\panda\pandas +configfile: pyproject.toml +plugins: anyio-4.9.0, hypothesis-6.130.12, cov-6.1.1, cython-0.3.1, localserver-0.9.0.post0, qt-4.4.0, xdist-3.6.1 +collected 16743 items + +pandas\tests\indexes\base_class\test_constructors.py ........... +pandas\tests\indexes\base_class\test_formats.py ............. +pandas\tests\indexes\base_class\test_indexing.py ............. +pandas\tests\indexes\base_class\test_pickle.py . +pandas\tests\indexes\base_class\test_reshape.py ...................... +pandas\tests\indexes\base_class\test_setops.py ............................................................ +pandas\tests\indexes\base_class\test_where.py . +pandas\tests\indexes\categorical\test_append.py ....... +pandas\tests\indexes\categorical\test_astype.py ........... +pandas\tests\indexes\categorical\test_category.py .......................................... +pandas\tests\indexes\categorical\test_constructors.py ..... +pandas\tests\indexes\categorical\test_equals.py ......... +pandas\tests\indexes\categorical\test_fillna.py ... +pandas\tests\indexes\categorical\test_formats.py . +pandas\tests\indexes\categorical\test_indexing.py ................................. +pandas\tests\indexes\categorical\test_map.py ..................... +pandas\tests\indexes\categorical\test_reindex.py ....... +pandas\tests\indexes\categorical\test_setops.py .. +pandas\tests\indexes\datetimelike_\test_drop_duplicates.py ................................................................................................................ +pandas\tests\indexes\datetimelike_\test_equals.py ..................... +pandas\tests\indexes\datetimelike_\test_indexing.py ................ +pandas\tests\indexes\datetimelike_\test_is_monotonic.py . +pandas\tests\indexes\datetimelike_\test_nat.py .... +pandas\tests\indexes\datetimelike_\test_sort_values.py ............................................................... +pandas\tests\indexes\datetimelike_\test_value_counts.py ............................................ +pandas\tests\indexes\datetimes\methods\test_asof.py .. +pandas\tests\indexes\datetimes\methods\test_astype.py ................................. +pandas\tests\indexes\datetimes\methods\test_delete.py ....................... +pandas\tests\indexes\datetimes\methods\test_factorize.py .................................................................................... +pandas\tests\indexes\datetimes\methods\test_fillna.py .. +pandas\tests\indexes\datetimes\methods\test_insert.py ......................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_isocalendar.py .. +pandas\tests\indexes\datetimes\methods\test_map.py ..... +pandas\tests\indexes\datetimes\methods\test_normalize.py ...ssssss +pandas\tests\indexes\datetimes\methods\test_repeat.py .................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_resolution.py .................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_round.py ...................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\methods\test_shift.py ............................................................................................................................................ +pandas\tests\indexes\datetimes\methods\test_snap.py ........................ +pandas\tests\indexes\datetimes\methods\test_to_frame.py .. +pandas\tests\indexes\datetimes\methods\test_to_julian_date.py ..... +pandas\tests\indexes\datetimes\methods\test_to_period.py ............................................ +pandas\tests\indexes\datetimes\methods\test_to_pydatetime.py .. +pandas\tests\indexes\datetimes\methods\test_to_series.py . +pandas\tests\indexes\datetimes\methods\test_tz_convert.py .................................... +pandas\tests\indexes\datetimes\methods\test_tz_localize.py ................................................................................................................................................. +pandas\tests\indexes\datetimes\methods\test_unique.py ........................ +pandas\tests\indexes\datetimes\test_arithmetic.py .....................x +pandas\tests\indexes\datetimes\test_constructors.py ................................................................................................................................................................................................................x...x...X................................ +pandas\tests\indexes\datetimes\test_date_range.py ...s........................................................................................................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\datetimes\test_datetime.py ...................... +pandas\tests\indexes\datetimes\test_formats.py ................................. +pandas\tests\indexes\datetimes\test_freq_attr.py .......................... +pandas\tests\indexes\datetimes\test_indexing.py .......................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\datetimes\test_iter.py ............ +pandas\tests\indexes\datetimes\test_join.py ...................... +pandas\tests\indexes\datetimes\test_npfuncs.py . +pandas\tests\indexes\datetimes\test_ops.py ................ +pandas\tests\indexes\datetimes\test_partial_slicing.py .................................. +pandas\tests\indexes\datetimes\test_pickle.py ...... +pandas\tests\indexes\datetimes\test_reindex.py .. +pandas\tests\indexes\datetimes\test_scalar_compat.py ............................................................................ +pandas\tests\indexes\datetimes\test_setops.py .....................................................................................................................ss........... +pandas\tests\indexes\datetimes\test_timezones.py ........................................ +pandas\tests\indexes\interval\test_astype.py ....................................x........................................................................................................................... +pandas\tests\indexes\interval\test_constructors.py .......................................................................................................................................................................................................................................................s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s...............s.......s.......s.......s.......s.......s.......s.......s...........s.................s.....s.....s.....s.................................. +pandas\tests\indexes\interval\test_equals.py .... +pandas\tests\indexes\interval\test_formats.py ........... +pandas\tests\indexes\interval\test_indexing.py ............................................................................................................................................................................................................................................................................................ +pandas\tests\indexes\interval\test_interval.py .......x....x....x....x.................................................................................................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_range.py ............................................................................................................................................................. +pandas\tests\indexes\interval\test_interval_tree.py .................................................................................................................................................................................................................... +pandas\tests\indexes\interval\test_join.py ... +pandas\tests\indexes\interval\test_pickle.py .... +pandas\tests\indexes\interval\test_setops.py ................................................................................. +pandas\tests\indexes\multi\test_analytics.py ...................................... +pandas\tests\indexes\multi\test_astype.py ... +pandas\tests\indexes\multi\test_compat.py ...... +pandas\tests\indexes\multi\test_constructors.py ..................................................................................................... +pandas\tests\indexes\multi\test_conversion.py ........ +pandas\tests\indexes\multi\test_copy.py .......... +pandas\tests\indexes\multi\test_drop.py .............. +pandas\tests\indexes\multi\test_duplicates.py ................................................... +pandas\tests\indexes\multi\test_equivalence.py .............. +pandas\tests\indexes\multi\test_formats.py .......... +pandas\tests\indexes\multi\test_get_level_values.py ........ +pandas\tests\indexes\multi\test_get_set.py ................... +pandas\tests\indexes\multi\test_indexing.py ............................................................................................................................................. +pandas\tests\indexes\multi\test_integrity.py ................. +pandas\tests\indexes\multi\test_isin.py .............. +pandas\tests\indexes\multi\test_join.py ....................................................... +pandas\tests\indexes\multi\test_lexsort.py .. +pandas\tests\indexes\multi\test_missing.py ...x.. +pandas\tests\indexes\multi\test_monotonic.py ........... +pandas\tests\indexes\multi\test_names.py ............................... +pandas\tests\indexes\multi\test_partial_indexing.py ..... +pandas\tests\indexes\multi\test_pickle.py . +pandas\tests\indexes\multi\test_reindex.py ............ +pandas\tests\indexes\multi\test_reshape.py ........... +pandas\tests\indexes\multi\test_setops.py .........................................................................................F...................F.......................................................................F.......................sss.........................................F......................F.... +pandas\tests\indexes\multi\test_sorting.py ........................... +pandas\tests\indexes\multi\test_take.py ... +pandas\tests\indexes\multi\test_util.py ............... +pandas\tests\indexes\numeric\test_astype.py ................... +pandas\tests\indexes\numeric\test_indexing.py ........................................................................................................FF....................................................F............................FF................................................................... +pandas\tests\indexes\numeric\test_join.py ........... +pandas\tests\indexes\numeric\test_numeric.py .................................................................................................................... +pandas\tests\indexes\numeric\test_setops.py .................... +pandas\tests\indexes\object\test_astype.py . +pandas\tests\indexes\object\test_indexing.py ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... +pandas\tests\indexes\period\methods\test_asfreq.py ............... +pandas\tests\indexes\period\methods\test_astype.py ............. +pandas\tests\indexes\period\methods\test_factorize.py .. +pandas\tests\indexes\period\methods\test_fillna.py . +pandas\tests\indexes\period\methods\test_insert.py ... +pandas\tests\indexes\period\methods\test_is_full.py . +pandas\tests\indexes\period\methods\test_repeat.py ...... +pandas\tests\indexes\period\methods\test_shift.py ...... +pandas\tests\indexes\period\methods\test_to_timestamp.py ......... +pandas\tests\indexes\period\test_constructors.py ......................................................................................................... +pandas\tests\indexes\period\test_formats.py ..... +pandas\tests\indexes\period\test_freq_attr.py . +pandas\tests\indexes\period\test_indexing.py ......................................................................... +pandas\tests\indexes\period\test_join.py ........... +pandas\tests\indexes\period\test_monotonic.py .. +pandas\tests\indexes\period\test_partial_slicing.py .............. +pandas\tests\indexes\period\test_period.py .................................................................................................................................... +pandas\tests\indexes\period\test_period_range.py ........................... +pandas\tests\indexes\period\test_pickle.py .... +pandas\tests\indexes\period\test_resolution.py ......... +pandas\tests\indexes\period\test_scalar_compat.py ... +pandas\tests\indexes\period\test_searchsorted.py ........ +pandas\tests\indexes\period\test_setops.py .............. +pandas\tests\indexes\period\test_tools.py ............ +pandas\tests\indexes\ranges\test_constructors.py ............................. +pandas\tests\indexes\ranges\test_indexing.py ............... +pandas\tests\indexes\ranges\test_join.py .......................................... +pandas\tests\indexes\ranges\test_range.py ................................................................................................................................................................................................................ +pandas\tests\indexes\ranges\test_setops.py ................................................................... +pandas\tests\indexes\string\test_astype.py . +pandas\tests\indexes\string\test_indexing.py ................................................................................................................................................................................................................................. +pandas\tests\indexes\test_any_index.py .............................................................................................s.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_base.py ............................................................................................................................................................................x...............................................................................ssss....ss..........ss......ss............................................................................................................................ssss.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +pandas\tests\indexes\test_common.py ................................................................................................................................................................................................................................xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......................................................................................................................................sssssssss...s....ss.............................xs..........................sss................................................sss.................................................................................................s................s........................................................................................................................................................................................................................................................................................xx................FF..XX....FF....xx......................................... +pandas\tests\indexes\test_datetimelike.py ........................................ +pandas\tests\indexes\test_engines.py ......................................... +pandas\tests\indexes\test_frozen.py .......... +pandas\tests\indexes\test_index_new.py ............................................xxxxssss................................................................................................................ +pandas\tests\indexes\test_indexing.py ..........................................................ss..................................s.............................................................................................................................................................................................................................................................................................................................................................................................s.......................... +pandas\tests\indexes\test_mixed_int_string.py . +pandas\tests\indexes\test_numpy_compat.py ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ss..................xx..... +pandas\tests\indexes\test_old_base.py s...s...................sss.............................ssssssssss.s..........ss.................s.............s......s..............s..sss...................................................................................................s............................................................................ssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..sssssssss..s..s.......................s....................................................s................s.................................s................................sssssssss...s....s...sss........................................................................................................................ss......................ssssss.........................................................................................................................................................................s......................................................................s...s...........s...s...................................................................................s...s... +pandas\tests\indexes\test_setops.py ....................................................................................................................................................................................................................................................................................................................................................................................................................s.......................................................................................................................................ss..s.s...s...s........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................ssss....ss..........ss......ss.............................................................................................................................................................................................................................................................................................s................................................................................................................................................................................................................ +pandas\tests\indexes\test_subclass.py . +pandas\tests\indexes\timedeltas\methods\test_astype.py ............... +pandas\tests\indexes\timedeltas\methods\test_factorize.py .. +pandas\tests\indexes\timedeltas\methods\test_fillna.py . +pandas\tests\indexes\timedeltas\methods\test_insert.py ............... +pandas\tests\indexes\timedeltas\methods\test_repeat.py . +pandas\tests\indexes\timedeltas\methods\test_shift.py ...... +pandas\tests\indexes\timedeltas\test_arithmetic.py ... +pandas\tests\indexes\timedeltas\test_constructors.py ........................ +pandas\tests\indexes\timedeltas\test_delete.py ... +pandas\tests\indexes\timedeltas\test_formats.py ..... +pandas\tests\indexes\timedeltas\test_freq_attr.py ........... +pandas\tests\indexes\timedeltas\test_indexing.py .................................... +pandas\tests\indexes\timedeltas\test_join.py ....... +pandas\tests\indexes\timedeltas\test_ops.py .......... +pandas\tests\indexes\timedeltas\test_pickle.py . +pandas\tests\indexes\timedeltas\test_scalar_compat.py ........ +pandas\tests\indexes\timedeltas\test_searchsorted.py ........ +pandas\tests\indexes\timedeltas\test_setops.py ................................ +pandas\tests\indexes\timedeltas\test_timedelta.py ... +pandas\tests\indexes\timedeltas\test_timedelta_range.py ............................. + +================================== FAILURES =================================== +________________ test_difference_keep_ea_dtypes[Float32-val0] _________________ + +any_numeric_ea_dtype = 'Float32', val = + + @pytest.mark.parametrize("val", [pd.NA, 100]) + def test_difference_keep_ea_dtypes(any_numeric_ea_dtype, val): + # GH#48606 + midx = MultiIndex.from_arrays( + [Series([1, 2], dtype=any_numeric_ea_dtype), [2, 1]], names=["a", None] + ) + midx2 = MultiIndex.from_arrays( +> [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] + ) + +pandas\tests\indexes\multi\test_setops.py:454: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, nan], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +__________ test_symmetric_difference_keeping_ea_dtype[Float32-val0] ___________ + +any_numeric_ea_dtype = 'Float32', val = + + @pytest.mark.parametrize("val", [pd.NA, 5]) + def test_symmetric_difference_keeping_ea_dtype(any_numeric_ea_dtype, val): + # GH#48607 + midx = MultiIndex.from_arrays( + [Series([1, 2], dtype=any_numeric_ea_dtype), [2, 1]], names=["a", None] + ) + midx2 = MultiIndex.from_arrays( +> [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] + ) + +pandas\tests\indexes\multi\test_setops.py:475: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, nan], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +_________ test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] _________ + +dupe_val = , any_numeric_ea_dtype = 'Float32' + + @pytest.mark.parametrize("dupe_val", [3, pd.NA]) + def test_union_with_duplicates_keep_ea_dtype(dupe_val, any_numeric_ea_dtype): + # GH48900 + mi1 = MultiIndex.from_arrays( + [ +> Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), + Series([1, dupe_val, 2], dtype=any_numeric_ea_dtype), + ] + ) + +pandas\tests\indexes\multi\test_setops.py:607: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, nan, 2], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +__________________ test_union_keep_ea_dtype_with_na[Float32] __________________ + +any_numeric_ea_dtype = 'Float32' + + def test_union_keep_ea_dtype_with_na(any_numeric_ea_dtype): + # GH#48498 +> arr1 = Series([4, pd.NA], dtype=any_numeric_ea_dtype) + +pandas\tests\indexes\multi\test_setops.py:684: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([4, nan], dtype=object), dtype = dtype('float32'), copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +_______________ test_intersection_keep_ea_dtypes[Float32-val0] ________________ + +val = , any_numeric_ea_dtype = 'Float32' + + @pytest.mark.parametrize("val", [pd.NA, 100]) + def test_intersection_keep_ea_dtypes(val, any_numeric_ea_dtype): + # GH#48604 + midx = MultiIndex.from_arrays( + [Series([1, 2], dtype=any_numeric_ea_dtype), [2, 1]], names=["a", None] + ) + midx2 = MultiIndex.from_arrays( +> [Series([1, 2, val], dtype=any_numeric_ea_dtype), [1, 1, 3]] + ) + +pandas\tests\indexes\multi\test_setops.py:753: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\series.py:507: in __init__ + data = sanitize_array(data, index, dtype, copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, nan], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +_____________ TestGetIndexer.test_get_loc_masked[Float32-4-val22] _____________ + +self = +val = 4, val2 = , any_numeric_ea_and_arrow_dtype = 'Float32' + + @pytest.mark.parametrize("val, val2", [(4, 5), (4, 4), (4, NA), (NA, NA)]) + def test_get_loc_masked(self, val, val2, any_numeric_ea_and_arrow_dtype): + # GH#39133 +> idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) + +pandas\tests\indexes\numeric\test_indexing.py:321: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, 3, 4, nan], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +___________ TestGetIndexer.test_get_loc_masked[Float32-val3-val23] ____________ + +self = +val = , val2 = , any_numeric_ea_and_arrow_dtype = 'Float32' + + @pytest.mark.parametrize("val, val2", [(4, 5), (4, 4), (4, NA), (NA, NA)]) + def test_get_loc_masked(self, val, val2, any_numeric_ea_and_arrow_dtype): + # GH#39133 +> idx = Index([1, 2, 3, val, val2], dtype=any_numeric_ea_and_arrow_dtype) + +pandas\tests\indexes\numeric\test_indexing.py:321: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, 3, nan, nan], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +_______________ TestGetIndexer.test_get_loc_masked_na[Float32] ________________ + +self = +any_numeric_ea_and_arrow_dtype = 'Float32' + + def test_get_loc_masked_na(self, any_numeric_ea_and_arrow_dtype): + # GH#39133 +> idx = Index([1, 2, NA], dtype=any_numeric_ea_and_arrow_dtype) + +pandas\tests\indexes\numeric\test_indexing.py:330: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, nan], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-4] _____________ + +self = +any_numeric_ea_and_arrow_dtype = 'Float32', val = 4 + + @pytest.mark.parametrize("val", [4, 2]) + def test_get_indexer_masked_na(self, any_numeric_ea_and_arrow_dtype, val): + # GH#39133 +> idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) + +pandas\tests\indexes\numeric\test_indexing.py:375: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, nan, 3, 4], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +____________ TestGetIndexer.test_get_indexer_masked_na[Float32-2] _____________ + +self = +any_numeric_ea_and_arrow_dtype = 'Float32', val = 2 + + @pytest.mark.parametrize("val", [4, 2]) + def test_get_indexer_masked_na(self, any_numeric_ea_and_arrow_dtype, val): + # GH#39133 +> idx = Index([1, 2, NA, 3, val], dtype=any_numeric_ea_and_arrow_dtype) + +pandas\tests\indexes\numeric\test_indexing.py:375: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1, 2, nan, 3, 2], dtype=object), dtype = dtype('float32') +copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +_______________ test_sort_values_with_missing[complex64-first] ________________ + +index_with_missing = Index([(nan+nanj), (1+1j), (2+2j), (3+3j), (4+4j), (5+5j), + (6+6j), (7+7j), (8+8j), (nan+nanj)], + dtype='complex64') +na_position = 'first' +request = > + + @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") + @pytest.mark.parametrize("na_position", ["first", "last"]) + def test_sort_values_with_missing(index_with_missing, na_position, request): + # GH 35584. Test that sort_values works with missing values, + # sort non-missing and place missing according to na_position + + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + + if isinstance(index_with_missing, CategoricalIndex): + request.applymarker( + pytest.mark.xfail( + reason="missing value sorting order not well-defined", strict=False + ) + ) + + missing_count = np.sum(index_with_missing.isna()) + not_na_vals = index_with_missing[index_with_missing.notna()].values + sorted_values = np.sort(not_na_vals) + if na_position == "first": + sorted_values = np.concatenate([[None] * missing_count, sorted_values]) + else: + sorted_values = np.concatenate([sorted_values, [None] * missing_count]) + + # Explicitly pass dtype needed for Index backed by EA e.g. IntegerArray +> expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) + +pandas\tests\indexes\test_common.py:477: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +arr = array([None, None, (1+1j), (2+2j), (3+3j), (4+4j), (5+5j), (6+6j), (7+7j), + (8+8j)], dtype=object) +dtype = dtype('complex64'), copy = False + + def _try_cast( + arr: list | np.ndarray, + dtype: np.dtype, + copy: bool, + ) -> ArrayLike: + """ + Convert input to numpy ndarray and optionally cast to a given dtype. + + Parameters + ---------- + arr : ndarray or list + Excludes: ExtensionArray, Series, Index. + dtype : np.dtype + copy : bool + If False, don't copy the data if not needed. + + Returns + ------- + np.ndarray or ExtensionArray + """ + is_ndarray = isinstance(arr, np.ndarray) + + if dtype == object: + if not is_ndarray: + subarr = construct_1d_object_array_from_listlike(arr) + return subarr + return ensure_wrapped_if_datetimelike(arr).astype(dtype, copy=copy) + + elif dtype.kind == "U": + # TODO: test cases with arr.dtype.kind in "mM" + if is_ndarray: + arr = cast(np.ndarray, arr) + shape = arr.shape + if arr.ndim > 1: + arr = arr.ravel() + else: + shape = (len(arr),) + return lib.ensure_string_array(arr, convert_na_value=False, copy=copy).reshape( + shape + ) + + elif dtype.kind in "mM": + if is_ndarray: + arr = cast(np.ndarray, arr) + if arr.ndim == 2 and arr.shape[1] == 1: + # GH#60081: DataFrame Constructor converts 1D data to array of + # shape (N, 1), but maybe_cast_to_datetime assumes 1D input + return maybe_cast_to_datetime(arr[:, 0], dtype).reshape(arr.shape) + return maybe_cast_to_datetime(arr, dtype) + + # GH#15832: Check if we are requesting a numeric dtype and + # that we can convert the data to the requested dtype. + elif dtype.kind in "iu": + # this will raise if we have e.g. floats + + subarr = maybe_cast_to_integer_array(arr, dtype) + elif not copy: +> subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\construction.py:831: RuntimeWarning +________________ test_sort_values_with_missing[complex64-last] ________________ + +index_with_missing = Index([(nan+nanj), (1+1j), (2+2j), (3+3j), (4+4j), (5+5j), + (6+6j), (7+7j), (8+8j), (nan+nanj)], + dtype='complex64') +na_position = 'last' +request = > + + @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") + @pytest.mark.parametrize("na_position", ["first", "last"]) + def test_sort_values_with_missing(index_with_missing, na_position, request): + # GH 35584. Test that sort_values works with missing values, + # sort non-missing and place missing according to na_position + + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + + if isinstance(index_with_missing, CategoricalIndex): + request.applymarker( + pytest.mark.xfail( + reason="missing value sorting order not well-defined", strict=False + ) + ) + + missing_count = np.sum(index_with_missing.isna()) + not_na_vals = index_with_missing[index_with_missing.notna()].values + sorted_values = np.sort(not_na_vals) + if na_position == "first": + sorted_values = np.concatenate([[None] * missing_count, sorted_values]) + else: + sorted_values = np.concatenate([sorted_values, [None] * missing_count]) + + # Explicitly pass dtype needed for Index backed by EA e.g. IntegerArray +> expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) + +pandas\tests\indexes\test_common.py:477: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:630: in sanitize_array + subarr = _try_cast(data, dtype, copy) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +arr = array([(1+1j), (2+2j), (3+3j), (4+4j), (5+5j), (6+6j), (7+7j), (8+8j), + None, None], dtype=object) +dtype = dtype('complex64'), copy = False + + def _try_cast( + arr: list | np.ndarray, + dtype: np.dtype, + copy: bool, + ) -> ArrayLike: + """ + Convert input to numpy ndarray and optionally cast to a given dtype. + + Parameters + ---------- + arr : ndarray or list + Excludes: ExtensionArray, Series, Index. + dtype : np.dtype + copy : bool + If False, don't copy the data if not needed. + + Returns + ------- + np.ndarray or ExtensionArray + """ + is_ndarray = isinstance(arr, np.ndarray) + + if dtype == object: + if not is_ndarray: + subarr = construct_1d_object_array_from_listlike(arr) + return subarr + return ensure_wrapped_if_datetimelike(arr).astype(dtype, copy=copy) + + elif dtype.kind == "U": + # TODO: test cases with arr.dtype.kind in "mM" + if is_ndarray: + arr = cast(np.ndarray, arr) + shape = arr.shape + if arr.ndim > 1: + arr = arr.ravel() + else: + shape = (len(arr),) + return lib.ensure_string_array(arr, convert_na_value=False, copy=copy).reshape( + shape + ) + + elif dtype.kind in "mM": + if is_ndarray: + arr = cast(np.ndarray, arr) + if arr.ndim == 2 and arr.shape[1] == 1: + # GH#60081: DataFrame Constructor converts 1D data to array of + # shape (N, 1), but maybe_cast_to_datetime assumes 1D input + return maybe_cast_to_datetime(arr[:, 0], dtype).reshape(arr.shape) + return maybe_cast_to_datetime(arr, dtype) + + # GH#15832: Check if we are requesting a numeric dtype and + # that we can convert the data to the requested dtype. + elif dtype.kind in "iu": + # this will raise if we have e.g. floats + + subarr = maybe_cast_to_integer_array(arr, dtype) + elif not copy: +> subarr = np.asarray(arr, dtype=dtype) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\construction.py:831: RuntimeWarning +_____________ test_sort_values_with_missing[nullable_float-first] _____________ + +index_with_missing = Index([, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, ], dtype='Float32') +na_position = 'first' +request = > + + @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") + @pytest.mark.parametrize("na_position", ["first", "last"]) + def test_sort_values_with_missing(index_with_missing, na_position, request): + # GH 35584. Test that sort_values works with missing values, + # sort non-missing and place missing according to na_position + + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + + if isinstance(index_with_missing, CategoricalIndex): + request.applymarker( + pytest.mark.xfail( + reason="missing value sorting order not well-defined", strict=False + ) + ) + + missing_count = np.sum(index_with_missing.isna()) + not_na_vals = index_with_missing[index_with_missing.notna()].values + sorted_values = np.sort(not_na_vals) + if na_position == "first": + sorted_values = np.concatenate([[None] * missing_count, sorted_values]) + else: + sorted_values = np.concatenate([sorted_values, [None] * missing_count]) + + # Explicitly pass dtype needed for Index backed by EA e.g. IntegerArray +> expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) + +pandas\tests\indexes\test_common.py:477: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([nan, nan, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0], dtype=object) +dtype = dtype('float32'), copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +_____________ test_sort_values_with_missing[nullable_float-last] ______________ + +index_with_missing = Index([, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, ], dtype='Float32') +na_position = 'last' +request = > + + @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") + @pytest.mark.parametrize("na_position", ["first", "last"]) + def test_sort_values_with_missing(index_with_missing, na_position, request): + # GH 35584. Test that sort_values works with missing values, + # sort non-missing and place missing according to na_position + + non_na_values = [x for x in index_with_missing if pd.notna(x)] + if len({type(x) for x in non_na_values}) > 1: + pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + + if isinstance(index_with_missing, CategoricalIndex): + request.applymarker( + pytest.mark.xfail( + reason="missing value sorting order not well-defined", strict=False + ) + ) + + missing_count = np.sum(index_with_missing.isna()) + not_na_vals = index_with_missing[index_with_missing.notna()].values + sorted_values = np.sort(not_na_vals) + if na_position == "first": + sorted_values = np.concatenate([[None] * missing_count, sorted_values]) + else: + sorted_values = np.concatenate([sorted_values, [None] * missing_count]) + + # Explicitly pass dtype needed for Index backed by EA e.g. IntegerArray +> expected = type(index_with_missing)(sorted_values, dtype=index_with_missing.dtype) + +pandas\tests\indexes\test_common.py:477: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +pandas\core\indexes\base.py:571: in __new__ + arr = sanitize_array(data, None, dtype=dtype, copy=copy) +pandas\core\construction.py:605: in sanitize_array + subarr = cls._from_sequence(data, dtype=dtype, copy=copy) +pandas\core\arrays\masked.py:145: in _from_sequence + values, mask = cls._coerce_to_array(scalars, dtype=dtype, copy=copy) +pandas\core\arrays\numeric.py:281: in _coerce_to_array + values, mask, _, _ = _coerce_to_data_and_mask( +pandas\core\arrays\numeric.py:238: in _coerce_to_data_and_mask + values = dtype_cls._safe_cast(values, dtype, copy=False) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +cls = +values = array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, nan, nan], dtype=object) +dtype = dtype('float32'), copy = False + + @classmethod + def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray: + """ + Safely cast the values to the given dtype. + + "safe" in this context means the casting is lossless. + """ + # This is really only here for compatibility with IntegerDtype + # Here for compat with IntegerDtype +> return values.astype(dtype, copy=copy) +E RuntimeWarning: invalid value encountered in cast + +pandas\core\arrays\floating.py:55: RuntimeWarning +-------- generated xml file: C:\Users\xaris\panda\pandas\test-data.xml -------- +============================ slowest 30 durations ============================= +0.57s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize[] +0.40s setup pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.29s setup pandas/tests/indexes/test_setops.py::TestSetOps::test_set_ops_error_cases[string-python-intersection-0.5] +0.27s call pandas/tests/indexes/period/test_indexing.py::TestGetItem::test_getitem_seconds +0.24s call pandas/tests/indexes/datetimes/methods/test_tz_localize.py::TestTZLocalize::test_dti_tz_localize_roundtrip[tzlocal()] +0.15s call pandas/tests/indexes/interval/test_indexing.py::TestGetLoc::test_get_loc_scalar[both-3.5] +0.14s call pandas/tests/indexes/ranges/test_setops.py::test_range_difference +0.13s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ns] +0.13s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[ms] +0.13s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[s] +0.12s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[s] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_begin[us] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[us] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ms] +0.11s call pandas/tests/indexes/datetimes/test_date_range.py::TestDateRangeNonTickFreq::test_date_range_custom_business_month_end[ns] +0.09s call pandas/tests/indexes/datetimes/test_scalar_compat.py::test_against_scalar_parametric +0.09s teardown pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_range_removed_freq[3.5S-05:03:01-05:03:10] +0.08s call pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning +0.06s call pandas/tests/indexes/datetimes/methods/test_tz_convert.py::TestTZConvert::test_dti_tz_convert_dst +0.06s call pandas/tests/indexes/period/test_partial_slicing.py::TestPeriodIndex::test_range_slice_seconds[period_range] +0.05s call pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[neither-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[right-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[left-1] +0.05s call pandas/tests/indexes/interval/test_interval_tree.py::TestIntervalTree::test_get_indexer_closed[both-1] +0.05s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[10-object] +0.04s call pandas/tests/indexes/multi/test_sorting.py::test_remove_unused_levels_large[datetime64[D]-str] +0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz0] +0.04s call pandas/tests/indexes/datetimes/test_timezones.py::TestDatetimeIndexTimezones::test_with_tz[tz1] +0.04s call pandas/tests/indexes/multi/test_indexing.py::test_pyint_engine[8-uint64] +=========================== short test summary info =========================== +FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] +FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] +FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] +FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] +FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] +==== 14 failed, 16452 passed, 221 skipped, 53 xfailed, 3 xpassed in 33.67s ==== From c42ac084da11d337c536afb9b5fcb2e21895ebcc Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:23:17 +0300 Subject: [PATCH 23/32] Fix pytest.xfail usage in test_sort_values_with_missing --- pandas/tests/indexes/test_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_common.py b/pandas/tests/indexes/test_common.py index e04264a457b06..7ecceeefb9cac 100644 --- a/pandas/tests/indexes/test_common.py +++ b/pandas/tests/indexes/test_common.py @@ -450,13 +450,14 @@ def test_sort_values_invalid_na_position(index_with_missing, na_position): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") @pytest.mark.parametrize("na_position", ["first", "last"]) +@pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") def test_sort_values_with_missing(index_with_missing, na_position, request): # GH 35584. Test that sort_values works with missing values, # sort non-missing and place missing according to na_position non_na_values = [x for x in index_with_missing if pd.notna(x)] if len({type(x) for x in non_na_values}) > 1: - pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") if isinstance(index_with_missing, CategoricalIndex): request.applymarker( From 08f06b901293f99d29c732adc3e31eeacf83e4e6 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:27:29 +0300 Subject: [PATCH 24/32] Fix pytest.xfail usage in test_sort_values_invalid_na_position --- pandas/tests/indexes/test_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_common.py b/pandas/tests/indexes/test_common.py index 7ecceeefb9cac..b00b2a4fbc06e 100644 --- a/pandas/tests/indexes/test_common.py +++ b/pandas/tests/indexes/test_common.py @@ -439,10 +439,11 @@ def test_hasnans_isnans(self, index_flat): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") @pytest.mark.parametrize("na_position", [None, "middle"]) +@pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") def test_sort_values_invalid_na_position(index_with_missing, na_position): non_na_values = [x for x in index_with_missing if pd.notna(x)] if len({type(x) for x in non_na_values}) > 1: - pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)") + pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") with pytest.raises(ValueError, match=f"invalid na_position: {na_position}"): index_with_missing.sort_values(na_position=na_position) From 88565924570b78657436ec8465f792d3613f8547 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:31:09 +0300 Subject: [PATCH 25/32] Fix line length issue in test_numpy_compat.py --- pandas/tests/indexes/test_numpy_compat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index 544c45cf4d584..3fa5456413930 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -156,7 +156,8 @@ def test_numpy_ufuncs_reductions(index, func, request): if len(index) == 0: pytest.skip("Test doesn't make sense for empty index.") - if any(isinstance(x, str) for x in index) and any(isinstance(x, int) for x in index): + if any(isinstance(x, str) for x in index) and \ + any(isinstance(x, int) for x in index): request.applymarker( pytest.mark.xfail(reason="Cannot compare mixed types (int and str) in ufunc reductions") ) From e8338692371eaf8a9c8d97efce1dcc027b458bc9 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:32:34 +0300 Subject: [PATCH 26/32] Fix line length issue in test_numpy_compat.py --- pandas/tests/indexes/test_numpy_compat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index 3fa5456413930..0e072c7ab361d 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -159,7 +159,10 @@ def test_numpy_ufuncs_reductions(index, func, request): if any(isinstance(x, str) for x in index) and \ any(isinstance(x, int) for x in index): request.applymarker( - pytest.mark.xfail(reason="Cannot compare mixed types (int and str) in ufunc reductions") + pytest.mark.xfail( + reason="Cannot compare mixed types (int and str) in ufunc reductions" \ + " and should raise a TypeError" + ) ) if isinstance(index, CategoricalIndex) and index.dtype.ordered is False: From 5be6ef4797d76eabe7806f214502aeadd8b6f7ad Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:34:58 +0300 Subject: [PATCH 27/32] change comment --- pandas/tests/indexes/test_setops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index ea443c567dde5..81ad07487b336 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -75,7 +75,7 @@ def test_union_different_types(index_flat, index_flat2, request): idx1 = index_flat idx2 = index_flat2 - # Ειδική μεταχείριση για mixed-int-string + # Special handling for mixed int-string types if idx1.equals(pd.Index([0, "a", 1, "b", 2, "c"])) or idx2.equals(pd.Index([0, "a", 1, "b", 2, "c"])): idx1 = idx1.astype(str) idx2 = idx2.astype(str) From 7afd0d03b59a0b9be61a2fb055baf76b482c4a27 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:35:26 +0300 Subject: [PATCH 28/32] Fix line length issue in test_setops.py --- pandas/tests/indexes/test_setops.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 81ad07487b336..17ca92b3b8d19 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -76,7 +76,8 @@ def test_union_different_types(index_flat, index_flat2, request): idx2 = index_flat2 # Special handling for mixed int-string types - if idx1.equals(pd.Index([0, "a", 1, "b", 2, "c"])) or idx2.equals(pd.Index([0, "a", 1, "b", 2, "c"])): + if idx1.equals(pd.Index([0, "a", 1, "b", 2, "c"])) or \ + idx2.equals(pd.Index([0, "a", 1, "b", 2, "c"])): idx1 = idx1.astype(str) idx2 = idx2.astype(str) From 77d3069eb981795fa087d7c96fc92b1c0f705203 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:37:59 +0300 Subject: [PATCH 29/32] Fix line length issue in test_setops.py --- pandas/tests/indexes/test_setops.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 17ca92b3b8d19..fdb4f197b7b69 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -920,12 +920,14 @@ def test_symmetric_difference_mi(self, sort): index2 = MultiIndex.from_tuples([("foo", 1), ("bar", 3)]) def has_mixed_types(level): - return any(isinstance(x, str) for x in level) and any(isinstance(x, int) for x in level) + return any(isinstance(x, str) for x in level) and \ + any(isinstance(x, int) for x in level) for idx in [index1, index2]: for lvl in range(idx.nlevels): if has_mixed_types(idx.get_level_values(lvl)): - pytest.skip(f"Mixed types in MultiIndex level {lvl} are not orderable") + skip_message = f"Mixed types in MultiIndex level {lvl} are not orderable" + pytest.skip(skip_message) result = index1.symmetric_difference(index2, sort=sort) expected = MultiIndex.from_tuples([("bar", 2), ("baz", 3), ("bar", 3)]) From 218071c08a2e0cb9249acc0f7f5de2435bf69f16 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:39:10 +0300 Subject: [PATCH 30/32] Fix line length issue in test_algos.py --- pandas/tests/test_algos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 4a47e0de72b3b..49335d012cd67 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -77,8 +77,8 @@ def test_factorize(self, index_or_series_obj, sort): pytest.skip("Skipping test for empty Index") if obj.name == "mixed-int-string" or obj.name is None: - pytest.skip("Skipping test for mixed-int-string due to unsupported comparison between str and int") - + skip_message = "Skipping test for mixed-int-string due to unsupported comparison between str and int" + pytest.skip(skip_message) result_codes, result_uniques = obj.factorize(sort=sort) From 62c33192b4c3f6c988a0f232abded7dc966570a6 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:45:52 +0300 Subject: [PATCH 31/32] Fix long line issue and refactor xfail usage in test_sort_values_invalid_na_position --- pandas/tests/indexes/test_common.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandas/tests/indexes/test_common.py b/pandas/tests/indexes/test_common.py index b00b2a4fbc06e..0465eaf15a22c 100644 --- a/pandas/tests/indexes/test_common.py +++ b/pandas/tests/indexes/test_common.py @@ -439,7 +439,10 @@ def test_hasnans_isnans(self, index_flat): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") @pytest.mark.parametrize("na_position", [None, "middle"]) -@pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") +@pytest.mark.xfail( + reason="Sorting fails due to heterogeneous types in index (int vs str)" +) + def test_sort_values_invalid_na_position(index_with_missing, na_position): non_na_values = [x for x in index_with_missing if pd.notna(x)] if len({type(x) for x in non_na_values}) > 1: @@ -451,7 +454,9 @@ def test_sort_values_invalid_na_position(index_with_missing, na_position): @pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") @pytest.mark.parametrize("na_position", ["first", "last"]) -@pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") +@pytest.mark.xfail( + reason="Sorting fails due to heterogeneous types in index (int vs str)" +) def test_sort_values_with_missing(index_with_missing, na_position, request): # GH 35584. Test that sort_values works with missing values, # sort non-missing and place missing according to na_position From b68dc548b1e6e3abb76b05c7d95995a181cafe37 Mon Sep 17 00:00:00 2001 From: pelagia Date: Tue, 29 Apr 2025 20:53:04 +0300 Subject: [PATCH 32/32] Fix line length issue in tests --- pandas/tests/indexes/test_common.py | 8 ++++++-- pandas/tests/indexes/test_numpy_compat.py | 7 ++++--- pandas/tests/indexes/test_setops.py | 4 +++- pandas/tests/test_algos.py | 5 ++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pandas/tests/indexes/test_common.py b/pandas/tests/indexes/test_common.py index 0465eaf15a22c..112ed8e9cfe28 100644 --- a/pandas/tests/indexes/test_common.py +++ b/pandas/tests/indexes/test_common.py @@ -446,7 +446,9 @@ def test_hasnans_isnans(self, index_flat): def test_sort_values_invalid_na_position(index_with_missing, na_position): non_na_values = [x for x in index_with_missing if pd.notna(x)] if len({type(x) for x in non_na_values}) > 1: - pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") + pytest.mark.xfail( + reason="Sorting fails due to heterogeneous types in index (int vs str)" + ) with pytest.raises(ValueError, match=f"invalid na_position: {na_position}"): index_with_missing.sort_values(na_position=na_position) @@ -463,7 +465,9 @@ def test_sort_values_with_missing(index_with_missing, na_position, request): non_na_values = [x for x in index_with_missing if pd.notna(x)] if len({type(x) for x in non_na_values}) > 1: - pytest.mark.xfail(reason="Sorting fails due to heterogeneous types in index (int vs str)") + pytest.mark.xfail( + reason="Sorting fails due to heterogeneous types in index (int vs str)" + ) if isinstance(index_with_missing, CategoricalIndex): request.applymarker( diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index 0e072c7ab361d..f5ecd52bffbd1 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -160,11 +160,12 @@ def test_numpy_ufuncs_reductions(index, func, request): any(isinstance(x, int) for x in index): request.applymarker( pytest.mark.xfail( - reason="Cannot compare mixed types (int and str) in ufunc reductions" \ - " and should raise a TypeError" + reason=( + "Cannot compare mixed types (int and str) in ufunc reductions" + " and should raise a TypeError" + ) ) ) - if isinstance(index, CategoricalIndex) and index.dtype.ordered is False: with pytest.raises(TypeError, match="is not ordered for"): func.reduce(index) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index fdb4f197b7b69..b44734deca2df 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -926,7 +926,9 @@ def has_mixed_types(level): for idx in [index1, index2]: for lvl in range(idx.nlevels): if has_mixed_types(idx.get_level_values(lvl)): - skip_message = f"Mixed types in MultiIndex level {lvl} are not orderable" + skip_message = ( + f"Mixed types in MultiIndex level {lvl} are not orderable" + ) pytest.skip(skip_message) result = index1.symmetric_difference(index2, sort=sort) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 49335d012cd67..7c94819202820 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -77,7 +77,10 @@ def test_factorize(self, index_or_series_obj, sort): pytest.skip("Skipping test for empty Index") if obj.name == "mixed-int-string" or obj.name is None: - skip_message = "Skipping test for mixed-int-string due to unsupported comparison between str and int" + skip_message = ( + "Skipping test for mixed-int-string due to unsupported comparison " + "between str and int" + ) pytest.skip(skip_message) result_codes, result_uniques = obj.factorize(sort=sort)