Ebary Car Sales Exploring Date Project KeyError: "['date_crawled', 'last_seen'] not in index"

I’m running the code locally on my Jupyter notebook since the split screen is hard for me to experiment with the data exploration and cleaning.

At the Exploring Date Columns exercise here: Learn data science with Python and R projects

I get the following error for the entry:

KeyError                                  Traceback (most recent call last)
<ipython-input-95-569a7c431753> in <module>
----> 1 autos[['date_crawled','ad_created','last_seen']][0:5]

~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py in __getitem__(self, key)
   2804             if is_iterator(key):
   2805                 key = list(key)
-> 2806             indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
   2808         # take() does not accept boolean indexers

~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexing.py in _get_listlike_indexer(self, key, axis, raise_missing)
   1551         self._validate_read_indexer(
-> 1552             keyarr, indexer, o._get_axis_number(axis), raise_missing=raise_missing
   1553         )
   1554         return keyarr, indexer

~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexing.py in _validate_read_indexer(self, key, indexer, axis, raise_missing)
   1643             if not (self.name == "loc" and not raise_missing):
   1644                 not_found = list(set(key) - set(ax))
-> 1645                 raise KeyError(f"{not_found} not in index")
   1647             # we skip the warning on Categorical/Interval

KeyError: "['date_crawled', 'last_seen'] not in index"

I’m not sure what this means exactly. Appreciate any help in navigating this error message and what I could do to resolve it.

Click here to open the screen in a new tab.

Did you change the dataset somehow? I pasted your code in my notebook and it works fine

No. It’s what I downloaded from the project. I could try again by redownloading the csv