Skip to content

ee_to_pandas doesn't handle '<band>': None in feature collection #1775

Answered by giswqs
msteckle asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for reporting. The line data = ee_object.map(lambda f: ee.Feature(None, f.toDictionary(property_names))) is used to avoid exporting geometry coordinates, which can be overwhelming.

I noticed that when converting an ee.Feature to ee.Dictionary, GEE automatically removes the column with None values. See below. I am not sure if this is intentional behavior or a GEE bug.

Anyway, I have improved the function to add the missing column back to the dataframe. See #1776. Update the package using geemap.update_package() and restart the kernel to take effect.

BTW, you should avoid using for loop with GEE. It is not computationally efficient. In your case, zonal statistics is a much bette…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@msteckle
Comment options

Answer selected by giswqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants