I am new here. Here's my problem: I am trying to drop the rows in my data frame given a range of value. Code:
outlier_age = df3[ (df3['Age']<= 17.) & (df3['Age'] >= 75.) ].index
df4 = df3.drop(outlier_age , inplace=True)
and I am getting this error:
/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py:4169: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy errors=errors,
I feel like it has something to do with datatypes?
I tried the ==
operator just to get to try to drop at least the rows with the given value but it didn't worked.
I tried the same method on a different column, using a string and I was able to drop the rows with the specified string.