【发布时间】:2020-08-21 01:13:22
【问题描述】:
我正在编写以下代码:
# Resample, interpolate and inspect ozone data here
data = data.resample('D').interpolate()
data.info()
# Create the rolling window
***rolling = data.rolling(360)['Ozone']
# Insert the rolling quantiles to the monthly returns
data['q10'] = rolling.quantile(.1)
data['q50'] = rolling.quantile(.5)
data['q90'] = rolling.quantile(.9)
# Plot the data
data.plot()
plt.show()
对于星号线 (***),我想知道,我可以使用以下代替吗?
data['Ozone'].rolling(360)
为什么下面的表达式是False?
data.rolling(360)['Ozone']==data['Ozone'].rolling(360)
它们有什么区别?
【问题讨论】: