Skip to content
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

Indian dataframe issue #1

Open
SirRacha opened this issue Nov 28, 2022 · 2 comments
Open

Indian dataframe issue #1

SirRacha opened this issue Nov 28, 2022 · 2 comments

Comments

@SirRacha
Copy link

SirRacha commented Nov 28, 2022

Hi - thank you very much for this run through on world bank data! I found an issue with the data that could have come from a change on the API side over the years. Total population is the one column that gets removed and needs to be recalculated. Quick fix:

`
#pick the dataframe for the country India from the list of dataframes
dfIndia = list_df[1]

#Male Population in any given year=Total Population - Female Population
#validation so that the operation does not fail
if 'Male Population' in dfIndia.columns and 'Female Population' in dfIndia.columns:
# calculate
dfIndia["Total Population"] = dfIndia["Male Population"] + dfIndia["Female Population"]
else:
#print error message
print("One of the columns Total Population or Female Population is missing.")

list_df[1].head()
`

@Blazeblitz276
Copy link

Hey @SirRacha , Thanks for the resolution. It works perfectly.

@shwetajoshi601
Copy link
Owner

@SirRacha Thank you for pointing that out. Would you like to fix and raise a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants