На самом деле я пытаюсь построить график подсчета для моего numpy массива с формой (5216,1), используя библиотеку seaborn. Когда я пытаюсь вот так
train_y.shape
sns.set(style="darkgrid")
ax = sns.countplot(x="class", data=train_y)
Но это проходит вот так
AttributeError Traceback (most recent call last)
<ipython-input-33-44c4401caea5> in <module>
1 sns.set(style="darkgrid")
----> 2 ax = sns.countplot(x="class", data=train_y)
/opt/conda/lib/python3.7/site-packages/seaborn/categorical.py in countplot(x, y, hue, data, order, hue_order, orient, color, palette, saturation, dodge, ax, **kwargs)
3553 estimator, ci, n_boot, units, seed,
3554 orient, color, palette, saturation,
-> 3555 errcolor, errwidth, capsize, dodge)
3556
3557 plotter.value_label = "count"
/opt/conda/lib/python3.7/site-packages/seaborn/categorical.py in __init__(self, x, y, hue, data, order, hue_order, estimator, ci, n_boot, units, seed, orient, color, palette, saturation, errcolor, errwidth, capsize, dodge)
1613 """Initialize the plotter."""
1614 self.establish_variables(x, y, hue, data, orient,
-> 1615 order, hue_order, units)
1616 self.establish_colors(color, palette, saturation)
1617 self.estimate_statistic(estimator, ci, n_boot, seed)
/opt/conda/lib/python3.7/site-packages/seaborn/categorical.py in establish_variables(self, x, y, hue, data, orient, order, hue_order, units)
141 # See if we need to get variables from `data`
142 if data is not None:
--> 143 x = data.get(x, x)
144 y = data.get(y, y)
145 hue = data.get(hue, hue)
AttributeError: 'numpy.ndarray' object has no attribute 'get'
кто-нибудь, пожалуйста, помогите мне решить эту ошибку