code: def cum_percentile(series,q):
      
      total = series.sum()
      cum_sum = series.cumsum()
      return sum(cum_sum < total*q)
docs: Takes a series of ordered frequencies and returns the value at a specified quantile
      Parameters:
      series - Series
          The series to analyze
      q - number
          Quantile to get the value of