[Python] Importing GeoAccessor from ArcGIS python library fails

Discussão em 'Python' iniciado por Stack, Fevereiro 25, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to import the GeoAccessor class so I can use it to convert a pandas dataframe, but I get a message saying ImportError: cannot import name 'GeoAccessor' from 'arcgis.features'.

    I have the exact import as on this help page: https://developers.arcgis.com/python/latest/guide/part1-introduction-to-sedf/

    My code is roughly:

    from arcgis.features import GeoAccessor

    # dataframe is created along the line...

    sdf = GeoAccessor.from_xy(df, x_column='longitude', y_column='latitude', sr=4326)



    I'm using the arcgis library version 2.4.0. Please help me figure out what I'm doing wrong!

    Continue reading...

Compartilhe esta Página