Skip to content

Commit e748276

Browse files
authored
Remove 'ipydguuid' from get_visible_data() output (#155)
* remove ipydguuid from get_visible_data() * improve column dropping logic
1 parent 8b7a99d commit e748276

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ipydatagrid/datagrid.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ def get_visible_data(self):
410410
if self._visible_rows:
411411
data['data'] = [data['data'][i] for i in self._visible_rows]
412412

413-
return pd.DataFrame(data['data']).set_index(self._data['schema']['primaryKey'])
413+
return_df = pd.DataFrame(data['data']).set_index(self._data['schema']['primaryKey'])
414+
return_df.index = return_df.index.droplevel(return_df.index.nlevels - 1)
415+
return return_df
414416

415417
def transform(self, transforms):
416418
"""Apply a list of transformation to this DataGrid."""

0 commit comments

Comments
 (0)