Skip to content

Commit 852dde0

Browse files
committed
_append_same_dtype -> _concat_same_dtype
1 parent 528295d commit 852dde0

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Diff for: pandas/core/indexes/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1748,10 +1748,10 @@ def _concat(self, to_concat, name):
17481748
typs = _concat.get_dtype_kinds(to_concat)
17491749

17501750
if len(typs) == 1:
1751-
return self._append_same_dtype(to_concat, name=name)
1751+
return self._concat_same_dtype(to_concat, name=name)
17521752
return _concat._concat_index_asobject(to_concat, name=name)
17531753

1754-
def _append_same_dtype(self, to_concat, name):
1754+
def _concat_same_dtype(self, to_concat, name):
17551755
"""
17561756
Concatenate to_concat which has the same class
17571757
"""

Diff for: pandas/core/indexes/category.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,9 @@ def insert(self, loc, item):
635635

636636
def _concat(self, to_concat, name):
637637
# if calling index is category, don't check dtype of others
638-
return CategoricalIndex._append_same_dtype(self, to_concat, name)
638+
return CategoricalIndex._concat_same_dtype(self, to_concat, name)
639639

640-
def _append_same_dtype(self, to_concat, name):
640+
def _concat_same_dtype(self, to_concat, name):
641641
"""
642642
Concatenate to_concat which has the same class
643643
ValueError if other is not in the categories

Diff for: pandas/core/indexes/datetimelike.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ def summary(self, name=None):
837837
result = result.replace("'", "")
838838
return result
839839

840-
def _append_same_dtype(self, to_concat, name):
840+
def _concat_same_dtype(self, to_concat, name):
841841
"""
842842
Concatenate to_concat which has the same class
843843
"""

Diff for: pandas/core/indexes/interval.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ def _as_like_interval_index(self, other, error_msg):
867867
raise ValueError(error_msg)
868868
return other
869869

870-
def _append_same_dtype(self, to_concat, name):
870+
def _concat_same_dtype(self, to_concat, name):
871871
"""
872872
assert that we all have the same .closed
873873
we allow a 0-len index here as well
@@ -876,7 +876,7 @@ def _append_same_dtype(self, to_concat, name):
876876
msg = ('can only append two IntervalIndex objects '
877877
'that are closed on the same side')
878878
raise ValueError(msg)
879-
return super(IntervalIndex, self)._append_same_dtype(to_concat, name)
879+
return super(IntervalIndex, self)._concat_same_dtype(to_concat, name)
880880

881881
@Appender(_index_shared_docs['take'] % _index_doc_kwargs)
882882
def take(self, indices, axis=0, allow_fill=True,

Diff for: pandas/core/indexes/range.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def join(self, other, how='left', level=None, return_indexers=False,
444444
return super(RangeIndex, self).join(other, how, level, return_indexers,
445445
sort)
446446

447-
def _append_same_dtype(self, indexes, name):
447+
def _concat_same_dtype(self, indexes, name):
448448
return _concat._concat_rangeindex_same_dtype(indexes).rename(name)
449449

450450
def __len__(self):

0 commit comments

Comments
 (0)