enum_df = df.select_dtypes(include=['object'])
num_df = df.select_dtypes(exclude=['object'])
enum_df = enum_df.loc[:, ([(True if y != 1 else False) for y in [len(np.
    unique(x, return_counts=True)[-1]) for x in enum_df.T.as_matrix()]])]
num_df = num_df.loc[:, (num_df.var() == 0.0)]
df = pd.concat([num_df, enum_df], axis=1)
Panda dataframe удалить постоянный столбец