Skip to content

Instantly share code, notes, and snippets.

@eugeneyan
Created February 21, 2021 19:07
Show Gist options
  • Save eugeneyan/e823639085ae647446eeef9b491489b3 to your computer and use it in GitHub Desktop.
Save eugeneyan/e823639085ae647446eeef9b491489b3 to your computer and use it in GitHub Desktop.
Test data leak
def test_data_leak_in_test_data(dummy_titanic_df):
train, test = dummy_titanic_df
concat_df = pd.concat([train, test])
concat_df.drop_duplicates(inplace=True)
assert concat_df.shape[0] == train.shape[0] + test.shape[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment