udacity / DSND_Term2

Contains files related to content and project of DSND Term 2
MIT License
1.1k stars 1.66k forks source link

5_combining_data-solution.ipynb has bugs #44

Closed ZacksAmber closed 2 years ago

ZacksAmber commented 2 years ago

file path

The solution file 5_combining_data-solution.ipynb from /lessons/ETLPipelines/5_combinedata_exercise/ has bugs.

The following two value_name are wrong.

df_rural_melt = pd.melt(df_rural,\
                        id_vars=['Country Name', 'Country Code', 'Indicator Name', 'Indicator Code'],\
                       var_name = 'Year', value_name='Electricity_Value')
df_electricity_melt = pd.melt(df_electricity,\
                              id_vars=['Country Name', 'Country Code', 'Indicator Name', 'Indicator Code'],\
                             var_name='Year', value_name='Rural_Value')

They should be:

df_rural_melt = pd.melt(df_rural,\
                        id_vars=['Country Name', 'Country Code', 'Indicator Name', 'Indicator Code'],\
                       var_name = 'Year', value_name='Rural_Value')
df_electricity_melt = pd.melt(df_electricity,\
                              id_vars=['Country Name', 'Country Code', 'Indicator Name', 'Indicator Code'],\
                             var_name='Year', value_name='Electricity_Value')
melipass commented 2 years ago

I checked the notebook and the .csv files and I can confirm they're wrong, good catch. Just sent a PR.

ronny-udacity commented 2 years ago

Thanks for reporting the bug issue.