In power electronic traction transformer, the failure of the single-phase PWM rectifier will lead to performance degradation of the system. Thus, a feasible data-driven method is proposed to realize online fault diagnosis of single-phase PWM rectifier in this paper. The principle of the data-driven method is to construct a signal predictor based on historic database utilizing the nonlinear autoregressive exogenous(NARX) model with a randomized learning algorithm named extreme learning machine (ELM). Besides, the ensemble method is employed to improve the prediction accuracy and robustness against load fluctuation. In online diagnosis, the predictor and sensor operate simultaneously and their residual is generated. Afterward, the fault detection is conducted by comparing the residual with fault threshold and the fault classification is completed based on system fault symptoms and fault residuals analysis. Several hardware-in-loop tests are implemented to verify the applicability of the proposed diagnosis method. Test results show that this data-driven method is effective to perform the online fault diagnosis with fast fault detection speed and high classification accuracy, and robust against load fluctuation.