First guided project: Prison Breaks - complete but unsolved error

Hi Everyone,

I just completed my first guided project in the Python Data Science learning path (Prison Breaks). I was able to complete the project (with help from the solutions page), but even in doing so I am running into an error that I can’t seem to figure out.

When printing attempts per year, for some reason 2020 is showing 51 attempts, which I know can’t be right. You can also see this represented in the chart below. I believe my code is the same as the solutions page, and I’m not receiving syntax errors or anything like that. Is it a problem with the raw data?

Any advice would be helpful.

I am also still not entirely sure how to share my jupyter notebook, so hopefully this works:

Prison Break jupyter notebook.ipynb (84.9 KB)

Thanks!

Hi @ryan.jameson.martin, welcome to the community!

Restart the Kernel and Run All the cells again.

Follow the following steps to restart the Kernell and run all the cells:

  • Click on Kernel on the menu bar of the Jupyter interface on the right of the screen.
  • Click on Restart & Run All from the drop-down menu.

Restart and Run all will restart the kernel, which means that you will lose all the variables and computations you have in your memory, and after that, It’ll run all cells.

Happy learning.

2 Likes

That worked!! Thanks so much.

1 Like

Hi @ryan.jameson.martin

Welcome to the community and thanks for sharing your first project . The project looks great with well represented code lines and has thus rendered desired output . Have got few humble suggestions to make;

  • Check on the title of your project, remember the title tells the reader what your project is all about.
  • You haven’t worked with comments in your entire project, comments make it very easy for readers to adapt easily with your code lines.
  • Always consider re-running your entire project by clicking Restart and Run All in the drop down menu, for sequential numbering of your code cell.
  • Also check on the objectives, it’s very hard to identify the goal of your analysis that is from your workings.
  • You have hardly make an observations in most of the outputs displayed, the best approach is give short explanations accompanying whatever is outputted.
  • Always consider having a vertical display instead of horizontal display for easier readability more so when dealing with list of values which are somehow lengthy. For example your workings in cell[30] could have been more better with for loop ;
for  rows in data[:3]:
    print(rows)

Otherwise for me, everything looks good and well worked , Congratulations :clap: :clap:. looking forward to interact more of your upcoming projects and wishing you all the best. Meanwhile,you can check through this link provided by DQ ,it has some excellent guidelines on how you can style and make your project more presentable.

1 Like

Thank you so much for posting your Jupyter notebook with this!

Your code help me understand what they were asking for (and what mistakes I was making) a lot better.

1 Like