Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: duplicated() is reporting rows as duplicates when they aren't upon visual inspection. #61312

Copy link
Copy link
Closed
@nvd2291

Description

@nvd2291
Issue body actions

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

I got the creditcard.csv from Kaggle: https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud 

import pandas as pd
import numpy as np

credit_card_df = pd.read_csv('creditcard.csv')

duplicated_df = credit_card_df[credit_card_df.duplicated()]

duplicated_df

Issue Description

If you look at the output of the duplicated_df you can see rows 33 and 35 reported as duplicates when they aren't. The values are close but not exact duplicates

Expected Behavior

Would expect these rows to not be reported as duplicates because the values in the columns that aren't named 'Time' are not identical to each other.

Installed Versions

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugClosing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsNeeds TriageIssue that has not been reviewed by a pandas team memberIssue 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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.