@pytest.fixture
def replacer(self, how, from_key, to_key):
    '\n        Object we will pass to `Series.replace`\n        '
    if (how == 'dict'):
        replacer = dict(zip(self.rep[from_key], self.rep[to_key]))
    elif (how == 'series'):
        replacer = pd.Series(self.rep[to_key], index=self.rep[from_key])
    else:
        raise ValueError
    return replacer
Object we will pass to `Series.replace`
@pytest.fixture
def replacer(self, how, from_key, to_key):
    '\n        \n        '
    if (how == 'dict'):
        replacer = dict(zip(self.rep[from_key], self.rep[to_key]))
    elif (how == 'series'):
        replacer = pd.Series(self.rep[to_key], index=self.rep[from_key])
    else:
        raise ValueError
    return replacer