From fb4408f8d48937924a52b81cf8a2b999e4d08c22 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Sun, 15 Oct 2023 21:43:08 -0400 Subject: [PATCH] Fix ee_to_df missing column bug --- geemap/common.py | 3 +++ geemap/geemap.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/geemap/common.py b/geemap/common.py index f375d025bf..dc9f71a5a7 100644 --- a/geemap/common.py +++ b/geemap/common.py @@ -8940,6 +8940,9 @@ def ee_to_df(ee_object, col_names=None, sort_columns=False, **kwargs): if col_names is None: col_names = property_names col_names.remove("system:index") + for col in col_names: # add missing columns + if col not in df.columns.tolist(): + df[col] = None elif not isinstance(col_names, list): raise TypeError("col_names must be a list") diff --git a/geemap/geemap.py b/geemap/geemap.py index ebd46dd0e1..8e79685779 100644 --- a/geemap/geemap.py +++ b/geemap/geemap.py @@ -127,6 +127,9 @@ def __init__(self, **kwargs): self._USER_AGENT_PREFIX = "geemap" self.kwargs = kwargs super().__init__(**kwargs) + + if kwargs.get("height"): + self.layout.height = kwargs.get("height") # sandbox path for Voila app to restrict access to system directories. if "sandbox_path" not in kwargs: