ENH: updating export_resultset_csv and export_leaves_csv