You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following two lines throw a SettingWithCopyWarning warning (I am using pandas 2.2.2) because merged_24 is a view of the original merged DataFrame and not a copy.
/tmp/ipykernel_209/3386606497.py:13: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
merged_24['F5.8divF3.6'] = merged_24.ch3flux / merged_24.ch1flux
I think this merged_24 should be a copy:
merged_24=merged[(merged.flux_24>=0) ].copy()
The text was updated successfully, but these errors were encountered:
The following two lines throw a
SettingWithCopyWarning
warning (I am using pandas 2.2.2) becausemerged_24
is a view of the originalmerged
DataFrame and not a copy.I think this
merged_24
should be a copy:The text was updated successfully, but these errors were encountered: