Remove Duplicate Rows for Tip Tracker

5AC2C855-F1DA-403D-800C-5050E94B6968.png

Hi, I have a sheet for card tip entry. I want to be able to remove duplicate rows (one is entered twice accidentally as it has happened) 

Every single entry has a unique ID, so the 2 duplicates would have separate IDs but all other information is identical. The ID is the label of the row.

0 1 57
1 REPLY 1

I'm not sure what you mean by "remove duplicates" but you can use <code>groupby</code> with <code>as_index=False</code> to get a <code>DataFrame</code> with the duplicates removed. <code>df.groupby('ID', as_index=False).first() </code> If you want to just keep one of the two duplicates then you can use <code>drop_duplicates</code> with <code>keep='last'</code> <code>df.drop_duplicates('ID', keep='last') </code>

Top Labels in this Space