Multiple issues with Programming Assignment: Practice Lab: Advice for Applying Machine Learning

Having issues with this Lab. Need to complete to finish the course. All the tests are passed, but issues start after UNQ_C3 even though it passes the test. Latest is it can’t find pandas when pandas is there.

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

TypeError: ‘(slice(None, None, None), 0)’ is an invalid key

When i submit the Lab, I get:
Cell #18. Can’t compile the student’s code. Error: ModuleNotFoundError(“No module named ‘pandas’”)

It’s possible that the metadata in your notebook (which the grader uses) has become modified or deleted.

This can happen for a number of reasons, like adding cells, deleting cells, moving or copying cells, or using some other platform to edit the notebook and then uploading it back to Coursera for grading.

You may need to delete your current ipynb notebook file, and get a fresh copy and start over.

After using File->Open to delete your notebook, use Lab Help (the ? icon) and then the “Get Latest Version” too.

How do you delete it. I am on a mac have reloaded it the lab multiple times. After warning me that I’d lose all my work, it brings back the same thing.

Clearly states that all files will be replaced.

The message is misleading.
It doesn’t update any existing files.
It only replaces missing files.

So from the Files menu, you have to either Rename or Delete your existing file.

Then use “Get latest version”, then go back to the File->Open menu and you will see a fresh copy of the notebook.

I’ll all ears if you can tell me how to do either. Like I said those options do not exist for me. I can download the files or replace them from the help menu. I don’t know why there is no option for an admin to do this in cases like this. Been at this for 2 weeks. Course and every other lab/test before and after is complete already…really frustrated!

Mentors aren’t admins. We’re just people who help on the forums.

But you should have access to all of the tools you need.

Here is the notebook layout:

  1. is the File menu
  2. is the Lab Help menu

Under the File menu you will see this:
3) is how you Open the file list - from there you can Delete a file (see below)
4) is how to Rename a notebook.

When you use File->Open, you see this:


5) When you check the box next to a file, you will then see a red trash can icon 6). That’s how you delete a file.

1 Like

Thanks a lot. you’re a life saver. I had copied the file down to Cocalc. Bombed out there too.

1 Like