def makeOneStateSer(ser, state):
  """
  Creates a Series where state is 1 for the designated
  state and 0 otherwise.
  :param pd.Series ser:
       index: instance
       value: int (state)
  :param int
  :return pd.Series
  """
  result = ser.map(lambda v: 1 if v==state else 0)
  return result