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

BUG: fid_as_index=True doesn't set fid as index read_dataframe with use_arrow=True #264

Closed
theroggy opened this issue Aug 10, 2023 · 0 comments · Fixed by #265
Closed

BUG: fid_as_index=True doesn't set fid as index read_dataframe with use_arrow=True #264

theroggy opened this issue Aug 10, 2023 · 0 comments · Fixed by #265
Assignees

Comments

@theroggy
Copy link
Member

Script to reproduce:

import pyogrio

url = "https://github.com/geofileops/geofileops/raw/main/tests/data/polygon-parcel.gpkg"
for use_arrow in [True, False]:
    gdf = pyogrio.read_dataframe(url, use_arrow=use_arrow, fid_as_index=True)
    print(f"\nuse_arrow={use_arrow}, gdf.index:\n{gdf.index}")

relevant output:

use_arrow=True, gdf.index:
RangeIndex(start=0, stop=46, step=1)

use_arrow=False, gdf.index:
Index([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
       19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
       37, 38, 39, 40, 41, 42, 43, 44, 45, 46],
      dtype='int64', name='fid')
´´´
@theroggy theroggy self-assigned this Aug 10, 2023
@theroggy theroggy changed the title BUG: fid_as_index=True is ignored when using use_arrow=True in read_dataframe BUG: fid_as_index=True doesn't set fid as index read_dataframe with use_arrow=True Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant