teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

print(df.columns)の結果を記載。

2020/02/16 12:13

投稿

emix
emix

スコア6

title CHANGED
File without changes
body CHANGED
@@ -21,4 +21,8 @@
21
21
  raise KeyError(key)
22
22
  KeyError: '売上'
23
23
 
24
+ ```
25
+ ```Python
26
+ print(df.columns)
27
+ ###結果 Index(['商品番号', '売上(店舗)'], dtype='object')
24
28
  ```

1

エラーメッセージを記載。

2020/02/16 12:13

投稿

emix
emix

スコア6

title CHANGED
File without changes
body CHANGED
@@ -7,4 +7,18 @@
7
7
 
8
8
  ```Python
9
9
  df.query("売上(店舗) == 0")
10
+ ```
11
+
12
+ 下記のようなエラーメッセージが表示されています。
13
+
14
+ ```ここに言語を入力
15
+ Traceback (most recent call last):
16
+ File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pandas/core/computation/scope.py", line 188, in resolve
17
+ return self.resolvers[key]
18
+ File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/collections/__init__.py", line 891, in __getitem__
19
+ return self.__missing__(key) # support subclasses that define __missing__
20
+ File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/collections/__init__.py", line 883, in __missing__
21
+ raise KeyError(key)
22
+ KeyError: '売上'
23
+
10
24
  ```