By Hemanta Sundaray on 2021-08-08
Let’s read the budget.xlsx file into a DataFrame.
import pandas as pd
budget = pd.read_excel("budget.xlsx")
budget
Output:
We can see that we have duplicate rows in our DataFrame.
We can remove them using the drop_duplicates() method.
budget.drop_duplicates(inplace = True)
budget
Output:
The duplicate rows have been removed.