learn_df function

Learn from tree