python delete from dataframe code example Example 1: pandas dataframe delete column del df['column_name'] Example 2: delete rows in dataframe pandas df.drop(df.index[2])