Skip to content

Commit 4a114d2

Browse files
committed
Merge pull request #3079 from jreback/minor
DOC/CLN: cookbook addition, minor cleaning in internals.py
2 parents 4ed5d0d + 129e8dd commit 4a114d2

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

doc/source/cookbook.rst

+6
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ Grouping
9999
`Create multiple aggregated columns
100100
<http://stackoverflow.com/questions/14897100/create-multiple-columns-in-pandas-aggregation-function>`__
101101

102+
Splitting
103+
~~~~~~~~~
104+
105+
`Splitting a frame
106+
<http://stackoverflow.com/questions/13353233/best-way-to-split-a-dataframe-given-an-edge/15449992#15449992>`__
107+
102108
Timeseries
103109
----------
104110

pandas/core/internals.py

-8
Original file line numberDiff line numberDiff line change
@@ -795,14 +795,6 @@ def __nonzero__(self):
795795
def ndim(self):
796796
return len(self.axes)
797797

798-
def is_mixed_dtype(self):
799-
counts = set()
800-
for block in self.blocks:
801-
counts.add(block.dtype)
802-
if len(counts) > 1:
803-
return True
804-
return False
805-
806798
def set_axis(self, axis, value):
807799
cur_axis = self.axes[axis]
808800
value = _ensure_index(value)

pandas/tests/test_internals.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ def test_attrs(self):
238238
self.assertEquals(len(self.mgr), len(self.mgr.items))
239239

240240
def test_is_mixed_dtype(self):
241-
self.assert_(self.mgr.is_mixed_dtype())
241+
self.assert_(self.mgr.is_mixed_type)
242242

243243
mgr = create_blockmanager([get_bool_ex(['a']), get_bool_ex(['b'])])
244-
self.assert_(not mgr.is_mixed_dtype())
244+
self.assert_(not mgr.is_mixed_type)
245245

246246
def test_is_indexed_like(self):
247247
self.assert_(self.mgr._is_indexed_like(self.mgr))

0 commit comments

Comments
 (0)