Any solution for the guided project on "Working With Data Downloads"

Hi, can anyone, help me on resolving the below issue?

Compute the sums of all of the columns that break down enrollment by race and gender.

Screen Link:
https://app.dataquest.io/m/220/guided-project%3A-working-with-data-downloads/4/using-pandas-to-explore-enrollment-by-race

My Code:

Replace this line with your code

What I expected to happen:

What actually happened:

Replace this line with the output/error

Hi @ashleychoy, could you screenshot the question with your code because I don’t have access to this mission. Thanks!

@masterryan.prof

here is the mission, but i am stuck on that.

Thanks

Hi @ashleychoy could you also screenshot the learn part? I think this is part of the Data Science path which I don’t have access to (I’m under the Dataquest COVID-19 scholarship so I only have access to the Data Analyst path). Also not very sure what they are asking for. Could you also screenshot the data in the csv file?

Perhaps they are asking for you for the individual sum by race and gender so you should have two values, (i.e. race_sum and gender_sum) after using the .sum() dataframe method on the two columns… I’m not too sure about this since I don’t have the context of the question.

@masterryan.prof, the data file is very large i even cannot load from the screen, but i took the dataframe columns for your reference.

image

Again, thanks a lot for your help.

Regards,
Ashley

Hi @ashleychoy: I think since the statement is not very clear its up to your own interpretation on how you want to do it. I have attached 2 examples of code I came across when looking at the project on Github and both of them seem logical to me although they are two different approaches. I have attached links below:

(Although I think the one in the first link is way more efficient as he made use of one for loop instead of summing up the total for each race 1 by 1)

Hope this helps!

1 Like

@masterryan.prof, thanks a lot for your help. now i can understand for this.

@ashleychoy No worries! Anytime!

hi Ashleychoy im trying to open explortaion.py but dont know how my editor in read.py file i would appreciate it if you can help me.

Hi @hshf1992: may I know which file you are referring to and which editor you use? If it is VSCode or any others with support for Python (i.e. PyCharm etc) and you are trying to view a jupyter notebook file (.ipynb), you will need to install the corresponding jupyter notebook extension. You can also try to install jupyter on miniconda or Anaconda locally.

on the dataquest platform where it says editor next to Terminal below editor where it says read.py i want to be exploration.py .

@hshf1992: you will have to simply use the terminal to create the file as follows:

cd scripts
ls
touch exploration.py

Kindly revisit the command line missions to recap.

alright thanks but i tried it didn’t work but when i reload the page it worked because i tried touch and many other command it was let me create it but i couldn’t open or read it but reloading page the Solve the Answer. thanks anyway.