Hello,
I am at the 4th instruction of the assignment. Where I have to remove all rows with a dash as an index value. I used the code below, which actually works.
My Code:
euro_to_dollar.drop(euro_to_dollar[euro_to_dollar["US_dollar"] == "-"].index, inplace = True)
print(euro_to_dollar["US_dollar"].value_counts())
What I expected to happen:
I expected all index values with a dash to be removed from the dataframe. Although it worked, I am getting a SettingWithCopyWarning. So my question is whether it is wise to continue or should I adjust the code to avoid and if yes. How?
What actually happened:
/dataquest/system/env/python3/lib/python3.4/site-packages/ipykernel/__main__.py:3: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
app.launch_new_instance()