remove rows where pandas code example Example 1: drop columns pandas df.drop(columns=['B', 'C']) Example 2: delete a row in pandas dataframe df.drop(df.index[2])