Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regions2D.close_region() return SettingWithCopyWarning warnings #132

Open
leewujung opened this issue Sep 24, 2023 · 0 comments
Open

Regions2D.close_region() return SettingWithCopyWarning warnings #132

leewujung opened this issue Sep 24, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@leewujung
Copy link
Member

I tried doing

r2d_manual.data = r2d_manual.close_region(region=region_id_manual_hake)

The operation went through but returned the warning messages below.
It would be good to fix this so that we are careful about the caveats.

Warning messages:

/home/ec2-user/miniconda3/envs/hake_nasc_torch/lib/python3.11/site-packages/echoregions/regions2d/regions2d.py:229: 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
  region["time"] = region.apply(
/home/ec2-user/miniconda3/envs/hake_nasc_torch/lib/python3.11/site-packages/echoregions/regions2d/regions2d.py:232: 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
  region["depth"] = region.apply(

@leewujung leewujung added the bug Something isn't working label Sep 24, 2023
@leewujung leewujung added this to the 0.2.0 milestone Sep 24, 2023
@leewujung leewujung removed this from the v0.2.0 milestone Dec 11, 2023
@ctuguinay ctuguinay added this to the v0.3.0 milestone Apr 10, 2024
@ctuguinay ctuguinay self-assigned this Apr 26, 2024
@ctuguinay ctuguinay moved this to Todo in Echoregions Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants