AttributeError: у объекта 'NoneType' нет атрибута 'update' в plt.hist - PullRequest
0 голосов
/ 08 декабря 2018

Я хочу построить 2 переменные.один является категориальным, а другой - числовым значением.

gender  race/ethnicity  parental level of education     lunch           test preparation course     math score  reading score   writing score
108     Female  Group B     Associate'S Degree          Free/Reduced    None                        52          76              70
231     Male    Group C     Associate'S Degree          Standard        None                        46          43              42
764     Male    Group D     Some College                Standard        None                        60          63              59
0       Female  Group B     Bachelor'S Degree           Standard        None                        72          72              74
885     Female  Group C     Associate'S Degree          Standard        Completed                   62          76              80
419     Male    Group E     High School                 Free/Reduced    Completed                   57          56              54


df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1000 entries, 0 to 999
Data columns (total 8 columns):
gender                         1000 non-null object
race/ethnicity                 1000 non-null category
parental level of education    1000 non-null category
lunch                          1000 non-null object
test preparation course        1000 non-null object
math score                     1000 non-null int64
reading score                  1000 non-null int64
writing score                  1000 non-null int64
dtypes: category(2), int64(3), object(3)
memory usage: 49.3+ KB

plt.hist(data=df, x="education",y="math score")

output error:
"AttributeError: 'NoneType' object has no attribute 'update'

кто-нибудь знает, что я сделал не так?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...