Skip to content

Commit

Permalink
Improve ee_to_df function (#2074)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Jul 13, 2024
1 parent d619245 commit 16b2e02
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions geemap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -9133,10 +9133,9 @@ def ee_to_df(
raise TypeError("ee_object must be an ee.FeatureCollection")

try:
property_names = ee_object.first().propertyNames().sort().getInfo()
if remove_geom:
data = ee_object.map(
lambda f: ee.Feature(None, f.toDictionary(property_names))
lambda f: ee.Feature(None, f.toDictionary(f.propertyNames().sort()))
)
else:
data = ee_object
Expand Down

0 comments on commit 16b2e02

Please sign in to comment.