code: def nth(series, n, order_by=None):
      
  
      if order_by is not None:
          series = order_series_by(series, order_by)
      try:
          return series.iloc[n]
      except:
          return np.nan
docs: Returns the nth value of a series.
  
      Args:
          series (pandas.Series): column to summarize.
          n (integer): position of desired value. Returns `NaN` if out of range.
  
      Kwargs:
          order_by: a pandas.Series or list of series (can be symbolic) to order
              the input series by before summarization.