Skip to content

ENH:  #55648

@GoHuskers

Description

@GoHuskers

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I wish that I could use the duplicated() function on data which has na values

Feature Description

Add a new parameter to the duplicated function:

keepna = {'False, True}, default False

when keepna = False, current functionality works as is.
if keepna = True, the duplicated function would find the duplicate rows but including all rows with na values on any column within the specificed subset

Alternative Solutions

current alternative solution which I have found is to :

  1. overwrite na values with some particular constant value;
  2. execute the duplicated function; and then,
  3. change the all of the constant values from step 1. above back to nan.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds InfoClarification about behavior needed to assess issueNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions