thinkingmachines / ph-poverty-mapping

Mapping Philippine Poverty using Machine Learning, Satellite Imagery, and Crowd-sourced Geospatial Information
https://stories.thinkingmachin.es/philippines-most-vulnerable-communities/
MIT License
80 stars 31 forks source link

00_dhs_prep.ipynb Code error #35

Closed GIS243 closed 3 years ago

GIS243 commented 3 years ago

Hi @ardieorden ardieorden

For the following notebook 00_dhs_prep.ipynb data = dhs[[ 'Cluster number', 'Wealth index factor score combined (5 decimals)', 'Education completed in single years', 'Has electricity' ]].groupby('Cluster number').mean()

data['Time to get to water source (minutes)'] = dhs[[ 'Cluster number', 'Time to get to water source (minutes)' ]].replace(996, 0).groupby('Cluster number').median()

data.columns = [[ 'Wealth Index', 'Education completed (years)', 'Access to electricity', 'Access to water (minutes)' ]]

print('Data Dimensions: {}'.format(data.shape)) data.head(2)

For the bold part, I am getting the error message, how to resolve this, please. image

Thanks

ardieorden commented 3 years ago

Hi @GIS243 , we'll try reproducing this error by this week and we'll get back to you then!

GIS243 commented 3 years ago

@ardieorden

I implemented it on Jupyter Notebook and it worked.

Thanks

ardieorden commented 3 years ago

Hi @GIS243 , got caught up in other work, sorry!

Glad to know it worked! I'll close this issue now.