Skip to content

Commit

Permalink
deep copying pandas dataframe for caching (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-nik authored Jul 11, 2024
1 parent b4a1f43 commit 04e7600
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jupyterlab_sql_editor/ipython_magic/sparksql/sparksql.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def sparksql(self, line=None, cell=None, local_ns=None):
self.cached_limit = limit
self.cached_df = df
self.cached_results = results
self.cached_pdf = pdf
self.cached_pdf = pdf.copy() if pdf is not None else None

display_df(
original_df=df,
Expand Down
2 changes: 1 addition & 1 deletion jupyterlab_sql_editor/ipython_magic/trino/trino.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def trino(self, line=None, cell=None, local_ns=None):

# Cache results
self.cached_sql = sql
self.cached_pdf = pdf
self.cached_pdf = pdf.copy() if pdf is not None else None

_display_results(
pdf=pdf if pdf is not None else pd.DataFrame([]),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyterlab-sql-editor",
"version": "1.1.2",
"version": "1.1.3",
"description": "SQL editor support for formatting, syntax highlighting and code completion of SQL in cell magic, line magic, python string and file editor.",
"keywords": [
"jupyter",
Expand Down

0 comments on commit 04e7600

Please sign in to comment.