My work on Visualizing The Gender Gap In College Degrees

Hi everyone
here is my last project. I will appreciate any comment on how my codes can be more readable.
I know what I have done, but this is more important how others will find my code organized and readable.
good luck with your study

Visualizing The Gender Gap In College Degrees.ipynb (178.1 KB)

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

1 Like

Hi @reza_45

Congratulations on finishing another project. Your project looks good. You’ve done it with very minimal number of lines of code! That is great.

It would be great if you could re-run all the cells before submitting. Looks like there is an error showing in output cell 6.

Another thing is

for key, spine in ax.spines.items():

Can also be written using ax.spines.values() then you can just use one variable alone for iterating.

Also it would be great if you could add a conclusion part as well to your project. Otherwise everything looks great to me. Keep up the good work.

1 Like

Hi jithins
Thank you for your comments. Your suggestion for spine.values is great. However, I tried to find any error and re-ran my code on the website, even on my computer as I work with Jupyterlab. Both of them did not generate any error. May you please be more specific what was the error you got.
Best regards

Hi @reza_45

In the notebook you shared,

NameErrorTraceback (most recent call last)
<ipython-input-6-9bd0cde417ef> in <module>()
      4 # exploring the dataframe
      5 print(
----> 6 display(men_degrees.head())
      7 print(women_degrees.describe())

NameError: name 'display' is not defined

These lines were present. You might have removed it because I couldn’t find that line on your code. If you’d have re-run the kernal before submitting, it wouldn’t have present. Also the missing cell numbers in between will also be sorted.

Hi @jithins123
I got this now. I had removed these codes before as it does not work in Notebook but works for Jupyterlab. I had saved the change but didn’t re-run my notebook(another lesson to learn). :slight_smile:

1 Like