def age_range(age):
    if  age <= 18:
        return 'Minors'
    elif age >= 19 & age < 63:
        return 'Adults'
    elif age >= 63 & age < 101:
        return 'Senior Citizen'
    else:
        return 'Age Unknown'
titanic_data_df["PassengerType"] = titanic_data_df[['Age']].apply(age_range, axis = 1)
titanic_data_df.head()
I get the following error when I try to add a new column to an existing dataframe (titanic_data_df):
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-466-741f5646101e> in <module>()
      1 #create a new df with just age and distinguish each passenger as minor, adult or senior citizen
----> 2 titanic_data_df["PassengerType"] =     titanic_data_df[['Age']].apply(age_range, axis = 1)
      3 
      4 titanic_data_df.head()
C:\Users\test\Anaconda2\envs\py27DAND\lib\site-packages\pandas\core\frame.pyc in apply(self, func, axis, broadcast, raw, reduce, args, **kwds)
   4161                     if reduce is None:
   4162                         reduce = True
-> 4163                     return self._apply_standard(f, axis, reduce=reduce)
   4164             else:
   4165                 return self._apply_broadcast(f, axis)
C:\Users\test\Anaconda2\envs\py27DAND\lib\site-packages\pandas\core\frame.pyc in _apply_standard(self, func, axis, ignore_failures, reduce)
   4257             try:
   4258                 for i, v in enumerate(series_gen):
  -> 4259                     results[i] = func(v)
   4260                     keys.append(v.name)
   4261             except Exception as e:
 <ipython-input-465-e62ccbeee80e> in age_range(age)
      1 def age_range(age):
----> 2     if  age <= 18:
      3         return 'Minors'
      4     elif age >= 19 & age < 63:
      5         return 'Adults'
C:\Users\test\Anaconda2\envs\py27DAND\lib\site-packages\pandas\core\generic.pyc in __nonzero__(self)
    915         raise ValueError("The truth value of a {0} is ambiguous. "
    916                          "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
--> 917                          .format(self.__class__.__name__))
    918 
    919     __bool__ = __nonzero__
 ValueError: ('The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().', u'occurred at index 0')
From what I have read so far it has got something to do with my the if...else statement in the method above. I can't figure out what it is though. Any help is appreciated. Thank you.
 
     
    