liveBook · Manning

Exact duplicate

As explained in The Well-Grounded Data Analyst

An exact duplicate is a record whose relevant field values are identical to those of another record.

An exact duplicate is an event record whose relevant values match another record, such as user ID, session ID, event type, app, and timestamp. In app-usage data, nearly 60% of records may be exact duplicates, making data-quality checks part of analysis rather than a cleanup afterthought. section 12.5.1

Repeated app events

For user 138, an “Opened” event is followed immediately by a “Closed” event and another “Opened” event for the same app. The first and third rows are exact duplicates. Duplicates may not affect counts of unique apps, but they can inflate activity at particular times of day. section 12.5.1

Handle duplicates according to the intended analysis:

  • Keep them when counting unique apps if duplication does not change the result. section 12.5.1
  • Investigate or remove them when measuring phone-use timing, because uneven duplication can skew temporal results. section 12.5.1
  • Avoid blindly dropping exact duplicates: different-timestamp events can remain distinct and preserve additional problems. section 12.5.1
app_data.duplicated().sum() / len(app_data)

Calculate the proportion of exact duplicate rows before deciding whether remediation is necessary. section 12.5.1

How The Well-Grounded Data Analyst covers it

How deep it goes
Defines matching event fields, quantifies prevalence, and compares metric-specific consequences without resolving every duplicate cause.
Examples
Uses user 138’s repeated app events and a pandas duplicate-rate calculation.
What it assumes
Assumes tabular event data and teaches duplicate relevance through user, session, app, event, and timestamp fields.
What you can do after
Diagnose duplicate prevalence and choose whether remediation is warranted for a specific analytical metric.
How it connects
Connects exact duplicates with data cleaning, event records, timestamps, sessions, and unique-value analysis.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Well-Grounded Data Analyst. The section links point to the parts of the book it draws on.