I have a time series with an irregularly spaced index. I want to transform the data by subtracting a mean and dividing by a standard deviation for every point. However, I only want to calculate the means and standard deviations using those data values that are a predefined time distance away. In my example below, I used regularly spaced distances but I want this to accommodate irregular ones as well.

For example:

```
n = 20
ts = pd.Series(np.random.rand(n),
               pd.date_range('2014-05-01', periods=n, freq='T', name='Time'))

```

Lets say I want the zscore for each point relative to all points within one minute of that point.

The final result should look like the following series.

```
Time
2014-05-01 00:00:00    0.707107
2014-05-01 00:01:00   -0.752435
2014-05-01 00:02:00    0.866662
2014-05-01 00:03:00   -0.576136
2014-05-01 00:04:00   -0.580471
2014-05-01 00:05:00   -0.253403
2014-05-01 00:06:00   -0.076657
2014-05-01 00:07:00    1.054413
2014-05-01 00:08:00    0.095783
2014-05-01 00:09:00   -1.030982
2014-05-01 00:10:00    1.041127
2014-05-01 00:11:00   -1.028084
2014-05-01 00:12:00    0.198363
2014-05-01 00:13:00    0.851951
2014-05-01 00:14:00   -1.152701
2014-05-01 00:15:00    1.070238
2014-05-01 00:16:00   -0.395849
2014-05-01 00:17:00   -0.968585
2014-05-01 00:18:00    0.077004
2014-05-01 00:19:00    0.707107
Freq: T, dtype: float64

```