SuperNode.to_df#

SuperNode.to_df(columns=None, ignore_first=True, attr='name')[source]#

Creates a pandas DataFrame from the tree. Each layer beneath this node will become a column. The values under the columns are the name attributes of the nodes in the tree.

Parameters:
  • columns (list, default = None) – The column headers for the DataFrame.

  • ignore_first (bool, default=True) – If True, the current node will not be included in the DataFrame.

Returns:

df

Return type:

pandas.DataFrame