You’ve got inplace=False
so you’re not modifying df
. You want either
df.drop_duplicates(subset=None, keep="first", inplace=True)
or
df = df.drop_duplicates(subset=None, keep="first", inplace=False)
More Related Contents:
- Drop all duplicate rows across multiple columns in Python Pandas
- How to write to an existing excel file without overwriting data (using pandas)?
- Append existing excel sheet with new dataframe using python pandas
- Using Pandas to pd.read_excel() for multiple worksheets of the same workbook
- Remove pandas rows with duplicate indices
- Remove duplicates by columns A, keeping the row with the highest value in column B
- Convert Excel style date with pandas
- Import multiple excel files into python pandas and concatenate them into one dataframe
- Pandas: Looking up the list of sheets in an excel file
- Group duplicate column IDs in pandas dataframe
- How to concatenate two dataframes without duplicates?
- Remove duplicate rows from Pandas dataframe where only some columns have the same value
- append dataframe to excel with pandas
- pandas xlsxwriter, format table header – not sheet header
- Is there a way to auto-adjust Excel column widths with pandas.ExcelWriter?
- Refresh Excel External Data with Python
- How can I see the formulas of an excel spreadsheet in pandas / python?
- How to obtain sheet names from XLS files without loading the whole file?
- Write pandas dataframe to xlsm file (Excel with Macros enabled)
- Merge rows based on value (pandas to excel – xlsxwriter)
- From password-protected Excel file to pandas DataFrame
- Write to StringIO object using Pandas Excelwriter?
- Leave dates as strings using read_excel function from pandas in python
- Putting many python pandas dataframes to one excel worksheet
- Pandas: Reading Excel with merged cells
- How to repeat a Pandas DataFrame?
- Can Pandas read and modify a single Excel file worksheet (tab) without modifying the rest of the file?
- Pandas: parse merged header columns from Excel
- Python Pandas – Read csv file containing multiple tables
- How to “select distinct” across multiple data frame columns in pandas?