remove last 5 columns pandas code example Example: drop a column in pandas note: df is your dataframe df = df.drop('coloum_name',axis=1)