8000 view_eurostat_indicator: add object to editor and expose to shell · larray-project/larray-editor@31a31ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 31a31ac

Browse files
committed
view_eurostat_indicator: add object to editor and expose to shell
1 parent cd19225 commit 31a31ac

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

larray_editor/editor.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ def view_eurostat_indicator(self, index):
280280

281281
arr = freq_eurostat(selected_frequencies, arr)
282282

283+
# Load the data into the editor
284+
editor = self.parent()
285+
60B7 new_data = editor.data.copy()
286+
new_data[code] = arr
287+
editor.update_mapping(new_data)
288+
self.parent().kernel.shell.user_ns[code] = arr
289+
self.accept()
283290
except Exception:
284291
QMessageBox.critical(self, "Error", "Failed to load {}".format(code))
285292
self.parent().view_expr(arr, expr=code)

0 commit comments

Comments
 (0)
0