Pythonにてkaggleのデータを用い、データサイエンスの勉強を行っているのですが、
ライブラリseabornを活用するコードが通らず困っています。
エラー内容を読み解けず、対処法がわからずの状況です。
ちなみに、seabornのimportは事前の段階で行っている状況です。
Pythonのバージョンの問題なのでしょうか?
以下が通らななかったコードです。
sns.countplot('Embarked', date=df)
このコードに対し表記されているエラーは下記です。
/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variable as a keyword arg: x. From version 0.12, the only valid positional argument will be data
, and passing other arguments without an explicit keyword will result in an error or misinterpretation.
FutureWarning
ValueError Traceback (most recent call last)
<ipython-input-21-d021b1e63192> in <module>()
3
4 # 乗船した港を確認する
----> 5 sns.countplot('Embarked', date=df)
3 frames
/usr/local/lib/python3.7/dist-packages/seaborn/categorical.py in establish_variables(self, x, y, hue, data, orient, order, hue_order, units)
151 if isinstance(var, str):
152 err = "Could not interpret input '{}'".format(var)
--> 153 raise ValueError(err)
154
155 # Figure out the plotting orientation
ValueError: Could not interpret input 'Embarked'
<Figure size 720x432 with 0 Axes>以上になります。
お手数をおかけいたしますが、よろしくお願いいたします。
あなたの回答
tips
プレビュー