Skip to content

Instantly share code, notes, and snippets.

@arossouw
Created May 31, 2019 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arossouw/9cfa4874409c3c2976902416dee1721c to your computer and use it in GitHub Desktop.
Save arossouw/9cfa4874409c3c2976902416dee1721c to your computer and use it in GitHub Desktop.
Difference between 2 datasets
#!/usr/bin/env python2.7
import pandas as pd
row_1 = [200.3, 150.2]
row_2 = row_1 + [300.4]
df1 = pd.DataFrame(row_1, columns=['credit_amt'])
df2= pd.DataFrame(row_2, columns=['credit_amt'])
column = 'credit_amt'
df2[~df2[column].isin(df1[column])]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment