Skip to content

Commit

Permalink
Fix tree printout for MultiIndex columns (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmckinsey1 authored Apr 8, 2024
1 parent 79c009b commit fe68b12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hatchet/external/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ def render_frame(self, node, dataframe, indent="", child_indent=""):
else:
metric_str += " [{}]".format(annotation_content)

node_name = dataframe.loc[df_index, self.name]
if isinstance(dataframe.columns, pd.MultiIndex):
node_name = dataframe.loc[df_index, (self.name, "")]
else:
node_name = dataframe.loc[df_index, self.name]
if self.expand is False:
if len(node_name) > 39:
node_name = (
Expand Down

0 comments on commit fe68b12

Please sign in to comment.