Count Repeated Rows
A row of df is a repeat if an earlier row has exactly the same value in every column. Return how many rows are repeats, as an int.
Example 1
df {"a":[1,2,1,1],"b":["x","y","x","x"]}
returns 2
Rows 3 and 4 repeat row 1.
Constraints
- The tables are small
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More pandas problems
- Count Unique CitiesBeginner
- Count in RangeBeginner
- Drop Duplicate PairsBeginner
- Drop a ColumnBeginner
- Everyone ElseBeginner
- Max per ColumnBeginner
- Missing Price NamesBeginner
- Names in CityBeginner