Skip to content

[GH-2031] Geopandas.GeoSeries: Implement isna, notna and aliases (isnull, notnull) - #2032

Merged
jiayuasu merged 10 commits into
apache:masterfrom
petern48:isna_isnull_series
Jul 6, 2025
Merged

jiayuasu merged 10 commits into
apache:masterfrom
petern48:isna_isnull_series

Conversation

@petern48

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

Implement isna, notna and aliases (isnull, notnull)

How was this patch tested?

Added tests

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation.

@petern48
petern48 marked this pull request as ready for review July 3, 2025 22:27
@petern48
petern48 requested a review from jiayuasu as a code owner July 3, 2025 22:27

@zhangfengcdt zhangfengcdt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangfengcdt

Copy link
Copy Markdown
Member

Please merge the master and rerun the tests.

@jiayuasu
jiayuasu requested a review from Copilot July 6, 2025 17:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements missing-value detection methods (isna, notna and their aliases isnull, notnull) for GeoSeries and adds parameterized unit tests to validate their behavior.

  • Implemented isna, isnull, notna, and notnull in sedona.geopandas.geoseries.GeoSeries, replacing stubs.
  • Added pytest.mark.parametrize tests for these methods in both matching and core GeoSeries test files.
  • Introduced import pytest in test modules for decorator support.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
python/tests/geopandas/test_match_geopandas_series.py Replaced stub tests with parameterized isna/isnull and notna/notnull tests; missing import pytest at the top.
python/tests/geopandas/test_geoseries.py Added pytest.mark.parametrize tests for isna/isnull and notna/notnull; inserted import pytest.
python/sedona/geopandas/geoseries.py Implemented the four NA detection methods; notna lacks a boolean cast; duplicate stub definitions of these methods remain.
Comments suppressed due to low confidence (3)

python/tests/geopandas/test_match_geopandas_series.py:1

  • The file uses @pytest.mark.parametrize but does not import pytest; add import pytest at the top to enable decorator support.
# Licensed to the Apache Software Foundation (ASF) under one

python/tests/geopandas/test_match_geopandas_series.py:303

  • The second part of test_notna only exercises notna and not the notnull alias; consider parametrizing or adding an explicit check for fun='notnull' in this block.
        data = [Point(0, 0), None]

Comment thread python/sedona/geopandas/geoseries.py Resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread python/sedona/geopandas/geoseries.py Resolved
@jiayuasu
jiayuasu merged commit 812923e into apache:master Jul 6, 2025
@petern48
petern48 deleted the isna_isnull_series branch July 11, 2025 06:10
Kontinuation pushed a commit to Kontinuation/sedona that referenced this pull request Jan 21, 2026
…s (isnull, notnull) (apache#2032)

* Refactor process_geometry_column to create a more flexible query_geometry_column()

* Implement length()

* Implement isna and isnull

* Implement notna

* Fix doc strings to use sedona instead of geoseries

* Update python/sedona/geopandas/geoseries.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/sedona/geopandas/geoseries.py

---------

Co-authored-by: Jia Yu <jiayu@wherobots.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Geopandas.GeoSeries: Implement isna, notna and aliases (isnull, notnull)

4 participants