[col for col in data.columns if data_train[col].nunique() <= 1]
判断data.columns的列中,if该列满足条件,则将col加入列表中。