Python Forum
finding rows with one column distinct and the other column different
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
finding rows with one column distinct and the other column different
#1
Suppose we have the following table:

I am trying to do a duplicate check on only Name and Date column and a check to make sure that Title column is "not" duplicate. Salary column does not matter here.

Name Title Date Salary
Joan Analyst 25 51
Joan Support 25 49
Martha CEO 46 44
Martha CEO 46 10

If i use dedupe=df.drop_duplicates, that would give me only record with Joan. What i need instead is to drop Joan and keep Martha's records.

Any assistance would be much appreciated. Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Camelot not able to change column header shortmeister1 2 802 Mar-22-2025, 04:47 AM
Last Post: Pedroski55
  Transform 3 Columns into Single Column DaveG 9 3,605 Mar-19-2025, 03:46 AM
Last Post: robbert23
  renaming a column without a name in a dataframe Carbonpony 2 1,065 Jan-23-2025, 08:20 AM
Last Post: Carbonpony
  Updating column name with translation bobbydave 0 1,202 Sep-17-2024, 03:40 PM
Last Post: bobbydave
  adding a calculated column charles986 1 930 Jun-13-2024, 05:31 PM
Last Post: deanhystad
  adding a calculated column charles986 1 716 Jun-13-2024, 02:27 PM
Last Post: deanhystad
  Adding PD DataFrame column bsben 2 1,381 Mar-08-2024, 10:46 PM
Last Post: deanhystad
  Get an average of the unique values of a column with group by condition and assign it klllmmm 0 2,043 Feb-17-2024, 05:53 PM
Last Post: klllmmm
  Help copying a column from a csv to another file with some extras g0nz0uk 3 1,816 Feb-01-2024, 03:12 PM
Last Post: DeaD_EyE
  Converting column of values into muliple columns of counts highland44 0 913 Feb-01-2024, 12:48 AM
Last Post: highland44

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020