Closed yongduek closed 6 years ago
nsfg2.py:57: 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 df.birthwgt_lb1[df.birthwgt_lb1 > 20] = np.nan
df.birthwgt_lb1[df.birthwgt_lb1 > 20] = np.nan
cf: How to deal with SettingWithCopyWarning in Pandas?
Thank you!
The warning message below will be removed:
nsfg2.py:57: 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
df.birthwgt_lb1[df.birthwgt_lb1 > 20] = np.nan
cf: How to deal with SettingWithCopyWarning in Pandas?