caesar0301 / treelib

An efficient implementation of tree data structure in python 2/3.
http://treelib.readthedocs.io/en/latest/
Other
800 stars 185 forks source link

Get truncated tree at a given depth #203

Open emiliorighi opened 1 year ago

emiliorighi commented 1 year ago

Hi,

thanks for your efforts in creating and maintaining this amazing library.

I would like to know if there is a way to get the number of nodes/leaves at each level of the tree and if it is possible to truncate the tree at a specific depth.

thanks in advance for your help