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

dtype for point_gdf #61

Open
npr99 opened this issue Jun 20, 2024 · 1 comment
Open

dtype for point_gdf #61

npr99 opened this issue Jun 20, 2024 · 1 comment

Comments

@npr99
Copy link
Owner

npr99 commented Jun 20, 2024

/workspaces/intersect-community-data/pyncoda/ncoda_00e_geoutilities.py:294: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '4110850' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
copy_point_gdf.loc[precise_matches.index,geolevel+col] = polygon[col]
/workspaces/intersect-community-data/pyncoda/ncoda_00e_geoutilities.py:294: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value 'Cannon Beach' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
copy_point_gdf.loc[precise_matches.index,geolevel+col] = polygon[col]

@npr99
Copy link
Owner Author

npr99 commented Jun 20, 2024

/workspaces/intersect-community-data/pyncoda/ncoda_00e_geoutilities.py

Change lines 293

    # Explicitly cast to compatible dtype if necessary
    value = polygon[col]
    if copy_point_gdf[geolevel + col].dtype == 'float64':
        value = float(value)
    copy_point_gdf.loc[
        precise_matches.index, geolevel + col
    ] = value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant