Skip to content

FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated #125

Description

@paulschreiber

Description

Fix the code causing this warning:

soil_id/tests/us/test_us.py::test_empty_rank
  /Users/paul/.dev/soil-id-algorithm/soil_id/utils.py:1012: FutureWarning: The behavior of DataFrame concatenation with 
empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when 
determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
    site_vars = pd.concat([p_slope, mucompdata[["compname", "slope_r", "elev_r"]]], axis=0)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions