Skip to content

Update Assignment+3.py #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Assignment+3.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ def answer_nine():

answer_nine()

//'float' object has no attribute 'shape' this error is coming while running it
//so you could use this instead
//
def answer_nine():
Top15 = answer_one()
Top15['Population Estimate'] = Top15['Energy Supply']/Top15['Energy Supply per Capita']
Top15['Citable Documents per Capita'] = Top15['Citable documents']/Top15['Population Estimate']
Top15['Citable Documents per Capita'] = Top15['Citable Documents per Capita'].astype(float)
Top15['Energy Supply per Capita'] = Top15['Energy Supply per Capita'].astype(float)
return Top15['Citable Documents per Capita'].corr(Top15['Energy Supply per Capita'])
answer_nine()


# In[49]:

Expand Down