Python API equivalent to R's xgb.model.dt.tree

I’m probably missing it in the documentation, but is there a way to spit out the models’ tree structures to a dataframe in Python API (v0.8) like there is for R’ s API(v0.71) via the xgb.model.dt.tree() function?

Use get_dump() function.

Would you be interested in a pull request to the library that allows the user to get the results back in a pandas DataFrame for further manipulation and analysis? I think that’s an area where the R API has a clear advantage over Python. Much easier to work with an R data.table than json or text file.

Yes, feel free to submit a pull request. I’ll review it.