Case When in Numpy
callplan['CH'] = np.where(callplan['CH'] == 'ER', 'Modern Off & Digital',
np.where(callplan['CH'] == 'MF', 'Modern Off & Digital',
np.where(callplan['CH'] == 'UF', 'Urban Off',
np.where(callplan['CH'] == 'UN', 'Traditional On',
np.where(callplan['CH'] == 'MN', 'Modern On',
np.where(callplan['CH'] == 'RM', 'Rural On & Off',
callplan['CH']
))))))
np.where(callplan['CH'] == 'MF', 'Modern Off & Digital',
np.where(callplan['CH'] == 'UF', 'Urban Off',
np.where(callplan['CH'] == 'UN', 'Traditional On',
np.where(callplan['CH'] == 'MN', 'Modern On',
np.where(callplan['CH'] == 'RM', 'Rural On & Off',
callplan['CH']
))))))
Comments
Post a Comment