remove all rows pandas dataframe code example
Example 1: how to delete a column from a dataframe in python
del df['column']
Example 2: pandas dataframe remove rows by column value
df = df[df.line_race != 0]
Example 3: remove rows from dataframe
df.drop(['Cochice', 'Pima'])
Example 4: remove a columns in pandas
DataFrame.drop(self, labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise')[source]