Skip to content

Commit 5d49730

Browse files
jbrockmendeljorisvandenbossche
authored andcommitted
CLN: assorted cleanups (#31056)
1 parent 2ba6be7 commit 5d49730

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

pandas/core/indexes/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ def equals(self, other) -> bool:
10551055
if not isinstance(other, IntervalIndex):
10561056
if not is_interval_dtype(other):
10571057
return False
1058-
other = Index(getattr(other, ".values", other))
1058+
other = Index(other)
10591059

10601060
return (
10611061
self.left.equals(other.left)

pandas/core/internals/managers.py

-6
Original file line numberDiff line numberDiff line change
@@ -669,12 +669,6 @@ def is_numeric_mixed_type(self):
669669
self._consolidate_inplace()
670670
return all(block.is_numeric for block in self.blocks)
671671

672-
@property
673-
def is_datelike_mixed_type(self):
674-
# Warning, consolidation needs to get checked upstairs
675-
self._consolidate_inplace()
676-
return any(block.is_datelike for block in self.blocks)
677-
678672
@property
679673
def any_extension_types(self):
680674
"""Whether any of the blocks in this manager are extension blocks"""

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def __array__(self, dtype=None) -> np.ndarray:
701701
Returns
702702
-------
703703
numpy.ndarray
704-
The values in the series converted to a :class:`numpy.ndarary`
704+
The values in the series converted to a :class:`numpy.ndarray`
705705
with the specified `dtype`.
706706
707707
See Also

pandas/tests/frame/indexing/test_indexing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,7 @@ def test_type_error_multiindex(self):
21792179
dg = df.pivot_table(index="i", columns="c", values=["x", "y"])
21802180

21812181
with pytest.raises(TypeError, match="is an invalid key"):
2182-
str(dg[:, 0])
2182+
dg[:, 0]
21832183

21842184
index = Index(range(2), name="i")
21852185
columns = MultiIndex(

0 commit comments

Comments
 (0)