我是初学者,编写了以下代码:
wn=np.random.normal(loc=raw_data.Quantity.mean(), scale=raw_data.Quantity.std(), size=len(training_data))
training_data['wn']=wn
training_data.wn.plot(figsize=(20,5), title="LOL")
plt.title('White Noise')
plt.ylim(0,2400)
plt.show()
它给出了以下错误:
AttributeError:“numpy.ndarray”对象没有属性“plot”
以下是白噪声的值:
In[140]:wn
Out[140]: array([313.12254531, 43.56086818, 298.21441411, ..., -50.96308586, 193.43057718, 242.80841993])
谁能帮我解决这个问题?