How to select the inverse index in pd.DataFrame by using loc or iloc?
loc
iloc
I tried df.loc[!my_index,my_feature] but fail.
df.loc[!my_index,my_feature]
Assuming my_index are the row indices you want to ignore, you could drop these where they exist in the dataframe df:
df = df.drop(my_index, errors='ignore')