factorised creation of TreeDataFrame