# Drop last column of a dataframe df = df.iloc[: , :-1] # Drop last 2 column of a dataframe df = df.iloc[: , :-2]