Upsampling time series produces noisy derivative
#### Code Sample, a copy-pastable example

```python
from io import StringIO
import pandas as pd
from scipy import interpolate
import matplotlib.pyplot as plt

csv = StringIO("""date_time,CUM_PROD,RATE
2012-05-03 00:00:00.000000000,21306.043,23.143911
2012-05-08 11:15:00.000000000,21432.611,23.143911
2012-05-14 09:10:22.252800000,21569.47,23.143911
2012-05-19 04:35:16.396800000,21680.768,23.143911
2012-05-24 00:00:00.000000000,21792.064,23.143911
2012-05-29 18:22:40.540800000,21925.506,23.143911
2012-06-04 13:36:30.268800000,22059.771,23.143911
2012-06-09 09:51:19.728000000,22171.87,23.143911
2012-06-15 00:00:00.000000000,22301.23,23.143911
2012-06-21 03:10:53.875200000,22443.162,23.143911
2012-06-23 04:02:13.603200000,22490.275,23.143911
2012-06-24 17:55:46.848000000,22526.816,23.143911
2012-06-27 05:00:35.136000000,22583.787,23.143911
2012-06-29 21:36:23.241600000,22646.08,23.143911
2012-07-04 07:18:34.415999999,22748.016,23.143911
2012-07-08 01:25:36.307200000,22834.916,23.143911
2012-07-12 06:10:53.875200000,22932.076,23.143911
2012-07-18 03:05:26.937600000,23067.959,23.143911
2012-07-24 00:00:00.000000000,23203.842,23.143911
2012-07-28 12:00:00.000000000,23307.99,23.143911
2012-08-02 00:00:00.000000000,23412.139,23.143911
2012-08-07 06:01:45.494400000,23533.672,23.143911
2012-08-09 16:24:33.062400000,23589.97,23.143911
2012-08-12 10:02:24.144000000,23653.26,23.143911
2012-08-15 01:19:27.206400000,23714.285,23.143911
2012-08-17 15:06:09.100800000,23773.863,23.143911
2012-08-20 11:47:41.712000000,23840.104,23.143911
2012-08-24 21:44:49.459200000,23942.275,23.143911
2012-08-29 08:03:55.584000000,24044.803,23.143911
2012-09-02 14:28:00.451200000,24143.549,23.143911
2012-09-08 00:00:00.000000000,24268.46,23.143911
2012-09-13 00:00:00.000000000,24384.182,23.143911
2012-09-17 22:28:14.505600000,24498.428,23.143911
2012-09-23 13:20:30.451200000,24628.488,23.143911
2012-09-28 06:40:15.225600000,24737.777,23.143911
2012-10-03 00:00:00.000000000,24847.062,23.143911
2012-10-07 00:00:00.000000000,24993.674,36.65348
2012-10-09 00:00:00.000000000,25066.982,36.653137
2012-10-11 00:00:00.000000000,25140.287,36.653137
2012-10-14 17:39:04.953600000,25277.205,36.65333
2012-10-17 10:10:50.361600000,25375.756,36.653137
2012-10-20 02:59:28.377600000,25474.734,36.653137
2012-10-22 13:29:49.459200000,25564.082,36.653137
2012-10-25 00:00:00.000000000,25653.434,36.653137
2012-10-28 14:44:10.809599999,25785.9,36.653137
2012-11-01 09:26:22.070400000,25924.42,36.653137
2012-11-05 12:10:11.712000000,26075.201,36.653137
2012-11-10 10:47:34.684800000,26256.365,36.653137
2012-11-16 04:29:38.918400000,26466.66,36.652935
2012-11-21 09:27:56.937600000,26657.523,36.653137
2012-11-26 10:33:30.902400000,26842.459,36.653137
2012-12-02 05:16:45.494400000,27054.312,36.653137
2012-12-08 00:00:00.000000000,27266.166,36.653137
2012-12-09 00:00:00.000000000,27302.822,36.653137
2012-12-11 19:51:37.296000000,27406.46,36.653137
2012-12-16 00:19:41.260800000,27559.896,36.653137
2012-12-19 05:32:24.144000000,27677.816,36.653137
2012-12-21 08:56:29.097599999,27756.316,36.653137
2012-12-24 03:38:19.190400000,27858.176,36.653137
2012-12-27 02:35:23.424000000,27966.533,36.653137
2012-12-30 05:08:40.272000000,28080.393,36.653137
2013-01-03 00:00:00.000000000,28219.15,36.653137
2013-01-08 11:45:45.676800000,28420.38,36.653137
2013-01-10 20:49:16.665600000,28507.523,36.653137
2013-01-13 18:02:06.576000000,28613.223,36.653137
2013-01-18 00:00:00.000000000,28768.95,36.653137
2013-01-22 03:18:59.097600000,28920.627,36.653587
2013-01-26 09:26:43.152000000,29076.598,36.653137
2013-01-30 14:13:35.587200000,29230.514,36.653137
2013-02-04 00:00:00.000000000,29392.055,36.653137
2013-02-06 20:17:27.657600000,29496.35,36.653137
2013-02-09 05:49:48.288000000,29584.223,36.653137
2013-02-11 10:37:33.513600000,29664.855,36.653137
2013-02-15 01:36:09.100800000,29797.668,36.64804
2013-02-19 07:32:59.280000000,29953.357,36.653046
2013-02-23 07:20:30.451200000,30099.637,36.64767
2013-02-26 03:40:15.225600000,30203.986,36.653137
2013-03-01 00:00:00.000000000,30308.34,36.653137
2013-03-05 09:00:10.540800000,30468.697,36.65226
2013-03-09 15:09:19.008000000,30624.703,36.652893
2013-03-13 13:05:23.423999999,30768.168,36.653137
2013-03-17 15:41:18.556800000,30918.746,36.653137
2013-03-21 15:24:04.953600000,31064.924,36.654118
2013-03-26 00:00:00.000000000,31224.668,36.653137
2013-03-30 00:00:00.000000000,31371.281,36.653137
2013-04-03 00:00:00.000000000,31517.893,36.653137
""")

#raw data
raw = pd.read_csv(csv, parse_dates=['date_time'], index_col=0)
#resampled cumulative data
resampled = pd.DataFrame(raw['CUM_PROD'].resample(rule='MS').first())

#calculate effective rate in period
resampled['days'] = resampled.index
resampled['days'] = (resampled['days'].shift(-1) - resampled.index) / pd.np.timedelta64(1, 'D')
resampled['RATE_EFF'] = (resampled['CUM_PROD'].shift(-1) - resampled['CUM_PROD']) / resampled['days']

#float index for scipy linear interpolation
elapsed = (raw.index - raw.index[0]) / pd.np.timedelta64(1, 'D')
#float index for resampled data
elapsed_resampled = (resampled.index - resampled.index[0]) / pd.np.timedelta64(1, 'D')

interp = interpolate.interp1d(elapsed, raw['CUM_PROD'], kind='linear')

#calculate values from interpolator
resampled['CUM_PROD_INTERP'] = interp(elapsed_resampled)
#calculate corresponding effective rate
resampled['RATE_INTERP'] = (resampled['CUM_PROD_INTERP'].shift(-1) - resampled['CUM_PROD_INTERP']) / resampled['days']

#plot things
fig, ax = plt.subplots(2)

#cumulative plot
ax[0].plot_date(raw.index, raw['CUM_PROD'], marker='o', label='Raw data')
ax[0].plot_date(resampled.index, resampled['CUM_PROD'], linestyle='--', label='Pandas resample')
ax[0].plot_date(resampled.index, resampled['CUM_PROD_INTERP'], linestyle='--', label='Scipy interpolate')
ax[0].legend()

#rate plot
ax[1].plot_date(raw.index, raw['RATE'], linestyle='-', marker='None', label='Raw data')
ax[1].plot_date(resampled.index, resampled['RATE_EFF'], linestyle='--', label='Pandas resample')
ax[1].plot_date(resampled.index, resampled['RATE_INTERP'], linestyle='--', label='Scipy interpolate')
ax[1].legend()
```
#### Problem description
I'm calculating effective production rate in period (week/month etc) from irregularly spaced  cumulative production time series - see code. Using panda's `resample` produces noisy time series that doesn't match the original rate data. The workaround was to use linear interpolation from scipy (`interp1d`) and calculate the values from it. See figure below, where 'raw' rate data is compared with panda's and scipy's outputs:
![resample_for_git](https://user-images.githubusercontent.com/48984294/65510691-d5ed2680-ded5-11e9-8433-58820f0bfad2.png)

As evident from the graph, data coming out of panda's `resample` has oscillations which aren't observed in the original data.

Zooming in on cumulative production curve, it appears that pandas resampling overpredicts the values in some places and underpredicts in others, whereas scipy's linear interpolation is systematically above the original curve. I guess this is the source of 'noise' in resampled data in the figure above.

![resample_for_git_cum_resample](https://user-images.githubusercontent.com/48984294/65511472-93c4e480-ded7-11e9-9954-f2ccbdb3e8a0.png)

#### Expected Output
Resampling should honour source data and be free of artefacts not present in data. 

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en
LOCALE: English_United States.1252

pandas: 0.22.0
pytest: 3.3.2
pip: 9.0.1
setuptools: 38.4.0
Cython: 0.27.3
numpy: 1.14.0
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.6
patsy: 0.5.0
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 2.1.2
openpyxl: 2.5.3
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.2
lxml: 4.1.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.1
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
</details>
