# How To Find difference between two data frames?

How To Find difference between two data frames? Today in this tutorial we are going to learn about Find the difference between two data frames in Python so without wasting your time let’s start this tutorial.

1. How To Find difference between two data frames?

To Find difference between two data frames You can Also Use `isin` it `tuple` to get differentiate. Just like this: dtfrm1[~dtfrm1.apply(tuple,1).isin(dtfrm2.apply(tuple,1))] And now you can achieve differentiate.

2. Find difference between two data frames

To Find difference between two data frames You can find the difference between two data frames using drop_duplicates and it will drop duplicate values and in the output, you will get the difference: pd.concat([dtfrm1,dtfrm2]).drop_duplicates(keep=False) And now, You can find differences between your two data frames. Thanks.

## Method 1: Use drop_duplicates

You can find the difference between two data frames using drop_duplicates and it will drop duplicate values and in the output, you will get the difference.

``````pd.concat([dtfrm1,dtfrm2]).drop_duplicates(keep=False)
``````

And now, You can find differences between your two data frames. Thanks.

## Method 2: Use isin with tuple

You can Also Use `isin` it `tuple` to get differentiate. Just like this.

``dtfrm1[~dtfrm1.apply(tuple,1).isin(dtfrm2.apply(tuple,1))]``

And now you can achieve differentiate.

## Method 3: Use merge with indicator

You can Also Use `merge`` `it with `indicator` to get differentiate. Just like this.

``````dtfrm1.merge(dtfrm2,indicator = True, how='left').loc[lambda x : x['_merge']!='both']
``````

And now you can achieve differentiation.
{"ft_lang_label":"__label__en","ft_lang_prob":0.81547403,"math_prob":0.90472317,"size":1992,"snap":"2023-14-2023-23","text_gpt3_token_len":460,"char_repetition_ratio":0.17605634,"word_repetition_ratio":0.33101046,"special_character_ratio":0.22088353,"punctuation_ratio":0.14728682,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.959455,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-09T08:24:30Z\",\"WARC-Record-ID\":\"<urn:uuid:2a324000-75bb-4a92-a570-449c87103816>\",\"Content-Length\":\"194536\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b7cb17e3-9493-462a-9302-854b6d489369>\",\"WARC-Concurrent-To\":\"<urn:uuid:64136d07-1fa2-483d-b7d0-df9eec37e50b>\",\"WARC-IP-Address\":\"104.21.14.77\",\"WARC-Target-URI\":\"https://exerror.com/how-to-find-difference-between-two-data-frames/\",\"WARC-Payload-Digest\":\"sha1:XVSCCS4WRMM3XLCTJECTDGDPUW72KZHD\",\"WARC-Block-Digest\":\"sha1:BQJQFJ3VFFZWNIDYFPBSVBAWY7527G2A\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224655446.86_warc_CC-MAIN-20230609064417-20230609094417-00486.warc.gz\"}"}