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

Fix ee_to_df missing column bug #1776

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions geemap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
3 changes: 3 additions & 0 deletions geemap/geemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down