Я не могу построить гистограмму в блокноте Jupyter. Вот код ниже и сообщение об ошибке в ответ на него.
import pandas as pd
import numpy as np
from sklearn.datasets import load_boston
import matplotlib.pyplot as plt
housing_data = load_boston()
%matplotlib inline
housing_data.hist(bins = 50, figsize = (20, 15))
plt.show()
KeyError Traceback (most recent call last)
/anaconda3/lib/python3.6/site-packages/sklearn/utils/__init__.py in __getattr__(self, key)
60 try:
---> 61 return self[key]
62 except KeyError:
KeyError: 'hist'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-17-570a88b85d5d> in <module>()
----> 1 housing_data.hist(bins = 50, figsize = (20, 15))
2 plt.show();
/anaconda3/lib/python3.6/site-packages/sklearn/utils/__init__.py in __getattr__(self, key)
61 return self[key]
62 except KeyError:
---> 63 повысить AttributeError (ключ)
64
65 def setstate (self, state):
AttributeError: hist
Я новичок в этом, и, пожалуйста, помогите мне с этим.