Completed my first step in guided projects

Basics.ipynb (89.1 KB)

Click here to view the jupyter notebook file in a new tab

1 Like

HI @pillakishorekumar, you’ve done really great work for a start. to make your work better for next time, I’d advise you

  • Delete cells that don’t add any value to your work and rerun all the cells again
  • Add a proper introduction and add pictures to it it’d make your work more interesting to read
  • Add more context to each step you carried out
  • You didn’t add the outcome of your analysis at the end
    That’s all from me, cheers

Hello @pillakishorekumar,

@OlutokiJohn has given you great advice so I’m only going to touch on only one part.

There’s a slight mistake in your code in cell [13] (if you rerun all your cells, you’ll see which one is cell 13). You’ll need to reset count or it’ll accumulate and give you the wrong number of attempts per year.

Here’s an example:

min_year = min(data, key=lambda x: x[0])[0]
max_year = max(data, key=lambda x: x[0])[0]
years = []
for y in range(min_year, max_year + 1):
attempts_per_year = []
count = 0
item = []
for y in years:
    for row in data:
        if y == row[0]:
            count += 1
    item = y, count
    count = 0 # you need this to reset the count

Hope that helps. Cheers.

1 Like