Question: x = bdata [ [ Counter Sales,Drive - through Sales,Location ] ] Traceback ( most recent call last ) : Cell In [ 4

x = bdata[["Counter Sales","Drive-through Sales","Location"]]
Traceback (most recent call last):
Cell In[41], line 1
x = bdata[["Counter Sales","Drive-through Sales","Location"]]
File ~\anaconda3\Lib\site-packages\pandas\core\frame.py:3899 in __getitem__
indexer = self.columns._get_indexer_strict(key, "columns")[1]
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:6115 in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:6179 in _raise_if_missing
raise KeyError(f"{not_found} not in index")
KeyError: "['Location'] not in index"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!