title: Applying function to subclass of Pandas DataFrame just returns DataFrame and now Subclass
body: <p>I am trying to subclass Pandas' DataFrame object. </p>
  
  <pre><code>class AbundanceFrame(pd.DataFrame):
     'Subclass of DataFrame used for creating simulated dataset with various component timeseries'
  
      def __init__(self, days,*args,**kw):
          'Constructor for AbundanceFrame class, must pass index of timeseries'
          super(AbundanceFrame,self).__init__(index = days,*args,**kw)
          self.steps = 0
          self.monotonic = 0
  </code></pre>
  
  <p>I have a number of other methods that add simulated time-series to the resulting AbundanceFrame. The resulting Abundance frame takes on this form: </p>
  
  <p><img src="https://i.stack.imgur.com/2kdI3.jpg" alt="AbundanceFrame-Sample"></p>
  
  <p>I then want to apply poisson sampling noise to all data in the abundance frame. </p>
  
  <pre><code>def apply_poisson_noise(self,keys=False):
      temp = self.copy()
      #print type(temp)
      if keys != False: 
          for key in keys:
              temp[key] = np.random.poisson(self[key])            
      else: 
          temp = self.apply(np.random.poisson)
      return temp
  </code></pre>
  
  <p>With the above I can create an AbundanceFrame without problems. However when I attempt to apply_poisson_noise() it returns a DataFrame and not an AbundanceFrame. I have been searching online and have not found a method for applying functions to DataFrames in place for pandas. </p>
  
  <p>I would like to know how I can have this functionality and return an AbundanceFrame. </p>
  
  <p>Thank you!</p>