equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
109 stars 57 forks source link

CLN,ENH: replace dataframe vs get dataframe() and set_dataframe() #1112

Closed jcrivenaes closed 9 months ago

jcrivenaes commented 10 months ago

Since .dataframe property now is deprecated, replace all instances in both code and tests with get_dataframe() and set_dataframe().

Also deprecated dataframe() method in RegularSurface.

The get_dataframe() in Points/Polygons/Wells will have an option to use copy=False which will return a view of the Pandas dataframe instead of a copy, which will be faster and more memory efficient, but also more vulnerable if the dataframe is manipulated directly.

codecov-commenter commented 10 months ago

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (89b6082) 80.15% compared to head (164fb45) 80.16%.

Files Patch % Lines
src/xtgeo/xyz/points.py 38.46% 5 Missing and 3 partials :warning:
src/xtgeo/xyz/_xyz.py 69.56% 4 Missing and 3 partials :warning:
src/xtgeo/well/_well_oper.py 82.75% 3 Missing and 2 partials :warning:
src/xtgeo/plot/xsection.py 66.66% 4 Missing :warning:
src/xtgeo/plot/xtmap.py 50.00% 2 Missing :warning:
src/xtgeo/well/_wellmarkers.py 91.30% 0 Missing and 2 partials :warning:
src/xtgeo/grid3d/_grid_wellzone.py 85.71% 0 Missing and 1 partial :warning:
src/xtgeo/surface/_regsurf_gridding.py 0.00% 1 Missing :warning:
src/xtgeo/well/well1.py 96.87% 0 Missing and 1 partial :warning:
src/xtgeo/xyz/_xyz_io.py 66.66% 0 Missing and 1 partial :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1112 +/- ## ======================================= Coverage 80.15% 80.16% ======================================= Files 96 96 Lines 13534 13580 +46 Branches 2195 2196 +1 ======================================= + Hits 10848 10886 +38 - Misses 1953 1961 +8 Partials 733 733 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.