def setup(self):
    N = (10 ** 5)
    self.index = pd.CategoricalIndex(range(N), range(N))
    self.series = pd.Series(range(N), index=self.index).sort_index()
    self.category = self.index[500]
def setup(self):
    N = (10 ** 5)
    self.index = pd.CategoricalIndex(range(N), range(N))
    self.series = pd.Series(range(N), index=self.index).sort_index()
    self.category = self.index[500]