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

pandas.errors.IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer #6

Closed
alpha-beta-soup opened this issue Apr 21, 2023 · 0 comments

Comments

@alpha-beta-soup
Copy link
Member

df.groupby(f"h3_{resolution:02}").agg(aggfunc).round(decimals).astype(int)

When running raster2dggs and expecting integer output:

raster2dggs h3 --verbosity DEBUG --resolution 13 --upscale 4 --compression zstd --threads 7 --aggfunc median --decimals 0 --overwrite --warp_mem_limit 12000 --resampling mode sentinel-2.input.vrt sentinel-2.output.h3.parquet

I get almost to the end and then get the following error:

pandas.errors.IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer

This is possible because we need to use a Int64 (note capitalisation) data type, as it supports NaN.

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