Click here to Skip to main content
15,885,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there,

I am using the following Line Of Code, in Pandas :-

diff = df6.loc[~df6['Venue'].isin(df1['Venue'])]
diff


And I am not getting, the DataFrame Output result I want.

I wan't to have the DataFrame Rows Showing, where any Rows in the Venue Column, which have common words in both DataFrame are omitted. I.e. the Rows in Both DataFrames, will in one DataFrame have a Row for example, saying Mildenhall in the Venue Column, and in another row in the other DataFrame Venue column, say Mildenhall Airshow or have Mildenhall followed by other words in the Row, in the Venue Column. The Same for other Rows, so here I wan't only Rows in df6, that don't have the same Word, i.e. matching word, in the Venue Column compared with the other DataFrame df1 showing in the DataFrame output.

I assume I would need a Regex Expression to achieve this, or a modification to the Line of Code of isin ? And if so what would the new Line of Python Code look like ?

Any help would be much appreciated.

Best Regards

Eddie Winch

What I have tried:

Using the above line of Code.

i.e.

diff = df6.loc[~df6['Venue'].isin(df1['Venue'])]
diff
Posted
Updated 5-Apr-21 5:23am
v6

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900