I have two dataframes (498 rows and 249 rows) The index labels are objects I want to drop the columns which do not appear in the smaller DF so that both are 249 rows
INDEX DF1 (249 rows)
AB111
AB222
AB333
AB444
AB555
AB666
AB777
AB888
INDEX DF2 (498 rows)
AB111
dd222
AB222
dd333
AB333
dd666
AB444
dd999
AB555
dd000
AB666
AB777
AB888
uncommon_indices = np.setdiff1d(df_patient_info_train.index.values, df_rnaseq_dropped.values)
uncommom_tolist = uncommon_indices.tolist()
wanted = df_rnaseq_dropped.drop(uncommon_tolist, axis=0, inplace=True)
ERROR: .....
not found in axis