Skip to content

Commit da438b2

Browse files
authored
Remove extra index column on Gremlin results table (#343)
* Remove extra index column on Gremlin results table * Update Changelog Co-authored-by: Michael Chin <[email protected]>
1 parent 88f0d20 commit da438b2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd
1313
- Fixed %sparql_status magic to return query status without query ID ([Link to PR](https://github.com/aws/graph-notebook/pull/337))
1414
- Fixed incorrect Gremlin query --store-to output ([Link to PR](https://github.com/aws/graph-notebook/pull/334))
1515
- Fixed certain characters not displaying correctly in results table ([Link to PR](https://github.com/aws/graph-notebook/pull/341))
16+
- Fixed extra index column displaying in Gremlin results table on older Pandas versions ([Link to PR](https://github.com/aws/graph-notebook/pull/343))
1617
- Reverted Gremlin console tab to single results column ([Link to PR](https://github.com/aws/graph-notebook/pull/330))
1718
- Bumped jquery-ui from 1.13.1 to 1.13.2 (([Link to PR](https://github.com/aws/graph-notebook/pull/328))
1819

src/graph_notebook/magics/graph_magic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,9 @@ def gremlin(self, line, cell, local_ns: dict = None):
765765
results_df.insert(0, "#", range(1, len(results_df) + 1))
766766
if len(results_df.columns) == 2 and int(results_df.columns[1]) == 0:
767767
results_df.rename({results_df.columns[1]: 'Result'}, axis='columns', inplace=True)
768+
results_df.set_index('#', inplace=True)
769+
results_df.columns.name = results_df.index.name
770+
results_df.index.name = None
768771

769772
if not args.silent:
770773
metadata_output = widgets.Output(layout=gremlin_layout)

0 commit comments

Comments
 (0)