Python Forum
Create dataframe from the unique data of two dataframes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create dataframe from the unique data of two dataframes
#4
(Mar-01-2025, 07:14 AM)Pedroski55 Wrote: Try this, seems to work on the scant data you provided:

...

Output:
res Date Acct Type Amt Category Note Extra 1 2025-02-28 98765 Purchase 2.33 Coffee on debit
Sorry for the limited test data. I didn't want to overfill my post.

That appears to work, but it appears to drop any row where a single column is duplicated. What I was looking for was if all the columns were duplicated, except for the "Category" and "Note" column.

I did not explain it very well in my post. I probably confused myself while writing the post.

It looks like I made a small mistake: "...there is not a match on the "Date", "Acct", "Type", "Amount" or "Extra" columns ...". That "or" should have been an "and".
Reply


Messages In This Thread
RE: Create dataframe from the unique data of two dataframes - by Calab - Mar-01-2025, 04:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create new column in dataframe Scott 10 4,068 Jun-30-2024, 10:18 PM
Last Post: Scott
  Make unique id in vectorized way based on text data column with similarity scoring ill8 0 1,527 Dec-12-2022, 03:22 AM
Last Post: ill8
  How to insert data in a dataframe? man0s 1 2,050 Apr-26-2022, 11:36 PM
Last Post: jefsummers
  Filter data based on a value from another dataframe column and create a file using lo pawanmtm 1 5,334 Jul-15-2020, 06:20 PM
Last Post: pawanmtm
  Not able to figure out how to create bar plot on aggregate data - Python darpInd 1 3,034 Mar-30-2020, 11:37 AM
Last Post: jefsummers
  Merging two DataFrames based on indexes from two other DataFrames lucinda_rigeitti 0 2,444 Jan-16-2020, 08:36 PM
Last Post: lucinda_rigeitti
  Sample based on the distribution of a feature to create more balanced data set dervast 1 2,455 Nov-15-2019, 12:25 AM
Last Post: schuler
  datetime intervals - dataframe selection (via plotted data) karlito 0 2,178 Nov-12-2019, 08:16 AM
Last Post: karlito
  How to add data to the categorical index of dataframe as data arrives? AlekseyPython 1 3,125 Oct-16-2019, 06:26 AM
Last Post: AlekseyPython
  Create dataframe through Dictionary in pandas ift38375 2 3,108 Aug-11-2019, 01:09 AM
Last Post: boring_accountant

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020