title: Does Pandas have a resample method without dependency on a datetime index?
body: <p>I have a series that I want to apply an external function to in subsets/chunks of three. Although the actual external function is more complex, for the sake of an example, lets just assume my external function takes an ndarray of integers and returns the sum of all values. So for example:</p>
  <pre class="lang-py prettyprint-override"><code>series = pd.Series([1,1,1,1,1,1,1,1,1])
  # Some pandas magic similar to:
  result = series.resample(3).apply(myFunction)
  # where 3 just represents every 3 values and
  # result == pd.Series([3,3,3])
  </code></pre>
  <p>I looked at combining <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.resample.html?highlight=downsample#pandas-series-resample" rel="nofollow noreferrer">Series.resample</a> and <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.apply.html" rel="nofollow noreferrer">Series.apply</a> as hinted to by the psuedo code above but it appears <code>resample</code> depends on a datetime index. Any ideas on how I can effectively downsample by applying an external function like this without a datetime index? Or do you just recommend creating a temporary datetime index to do this then reverting to the original index?</p>