From 0bfad7c9345382b916953e59d41ee8a3a019bc43 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Mon, 7 Aug 2017 06:10:36 -0700 Subject: [PATCH] CLN: remove unused get methods in internals (#17169) * Remove unused get methods that would raise AttributeError if called * Remove unnecessary import --- pandas/core/internals.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pandas/core/internals.py b/pandas/core/internals.py index 0f85c4e046e5a..b9fca1dfbb7a1 100644 --- a/pandas/core/internals.py +++ b/pandas/core/internals.py @@ -327,10 +327,6 @@ def reindex_axis(self, indexer, method=None, axis=1, fill_value=None, fill_value=fill_value, mask_info=mask_info) return self.make_block(new_values, fastpath=True) - def get(self, item): - loc = self.items.get_loc(item) - return self.values[loc] - def iget(self, i): return self.values[i] @@ -1662,13 +1658,6 @@ def set(self, locs, values, check=False): assert locs.tolist() == [0] self.values = values - def get(self, item): - if self.ndim == 1: - loc = self.items.get_loc(item) - return self.values[loc] - else: - return self.values - def putmask(self, mask, new, align=True, inplace=False, axis=0, transpose=False, mgr=None): """ @@ -4730,8 +4719,6 @@ def _concat_indexes(indexes): def _block2d_to_blocknd(values, placement, shape, labels, ref_items): """ pivot to the labels shape """ - from pandas.core.internals import make_block - panel_shape = (len(placement),) + shape # TODO: lexsort depth needs to be 2!!