I think the problem is that the new testing data should have exactly the same order and column names with the training data, or xgboost will mess up. I found this on github of xgboost "xgboost relies only on the order of columns and it holds a user responsible to ensure the consistency."
测试顺序必须一样