Questions Tagged [Drop-Duplicates]

Questions Tagged [Drop-Duplicates]

questions related to removing (or dropping) unwanted duplicate values

154 questions
2 votes
3 answers
66 views

Remove 'duplicate' rows based on combinations in two columns

I have this example data.frame: df1 <- data.frame(v1 = c('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'), v2 = c('B', 'A', 'D', 'C', 'F', 'E', 'H', 'G'), value = c(1.12, ...
1 vote
1 answer
25 views

Drop duplicate rows that match the Header Row

Background: I'm pulling NFL data in from a URL year by year and the header row is duplicated multiple times. Partial Solution: I originally tried the .drop_duplicates() but it left me with two "...
0 votes
2 answers
72 views

SQL Delete specific rows based on date and criteria [duplicate]

I've got a table that has duplicate data that needs to be cleaned up. Consider the following example: CREATE TABLE #StackOverFlow ( [ctrc_num] int, [Ctrc_name] varchar(6), [docu] bit, ...
1 vote
1 answer
54 views

Pandas df.drop_duplicates() has no effect on multiple identical-like rows

When I run Pandas df.drop_duplicates() in python the duplicated lines don't disappear. It behaves just as if the three 3542.87 were different values (and indeed they are, read the end of my post). a ...
  • 11
0 votes
1 answer
45 views

why does python pandas DataFrame() returns 'duplicated' when value is duplicate

To my knowledge, "ValueError: cannot reindex on an axis with duplicate labels" means that you have two or more indix labels (or column labels) have the common name and pandas cannot decide ...
0 votes
3 answers
71 views

In Google Sheets, How Do I Produce a Column of Non-Dupe Values Between Two Columns

In this situation, Column A and Column B have a lot of similar values, but are non-identical and not in the same order. Without manipulating the two source columns, how can I create a Column C which ...
0 votes
1 answer
31 views

drop duplicates in list within data frames python

I have a dataframe that I have grouped with textbook ISBN and I the schools, state and grades that those books are used in. I want to remove the duplicates within the lists of the dataframe. I have ...
0 votes
1 answer
48 views

How to drop duplicated values in one column for each id in Data Frame in Python Pandas?

I have Data Frame in Python Pandas like below: data = {'id': [1, 1, 1, 1, 2, 2, 3, 3], 'nps': [8, 8, 8, 8, 7, 7, 9, 9], 'target': [True, True, True, True, False, False, True, True], ...
  • 2,292
0 votes
0 answers
6 views

Conditionally suppress record ID if it is the same as previous record ID but display the running total in detail records of crystal reports

I have a sales report that is grouped by Invoice_ID field. There are multiple invoices on the report. Within the Invoice_ID field, there are multiple detail records that may have the same product name ...
1 vote
2 answers
46 views

How to select a max value in a group in SQL

My goal is to only have 1 row per part number/color combo. I tried using the max function however it doesn't seem to be working right, it will still give me duplicate values: Here is my current code: ...
0 votes
0 answers
40 views

How to bulk delete duplicates in erpnext

How to bulk delete duplicates in erpnext I tried doing this in data import>update existing records but the downloaded file is 20mb and allowed import file size is 10mb I want to know how we can ...
0 votes
1 answer
17 views

Pandas drop_duplicates() gives odd results: Has anybody seen this already?

When I create a dataframe with a 3-level multiindex and run drop_duplicates() on it, the function seems to focus only on the first two levels of the index and ignores the third. index=[('2020-09-30', '...
0 votes
1 answer
26 views

Extract String from duplicate row, remove duplicate, give count of strings [duplicate]

I'm relatively new to Python/panda. Here is my problem: I have a df looking like this: df = pd.DataFrame({ 'ZIP Code': ['1234','1234', '5678', '9101'], 'City Name': ['City A', 'City A', 'City ...
0 votes
0 answers
41 views

Python Logger In "for" Loop Producing Duplicate Outputs

I've created a function (part of a created class) which accepts the name of a pdf file then extracts its contents. Inside that function, I've placed a logger which will be sent to a file and the ...
0 votes
2 answers
23 views

DolphinDB: Find records only exist in one table but not other

I have two tables, new (shared table) and old (regular in-memory table), each with less than 10,000 rows. Both tables contain columns “a“ and “b“, and values in the "a" columns are unique. I ...

15 30 50 per page
1
2 3 4 5
…
11
Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.