Created
February 21, 2021 19:07
-
-
Save eugeneyan/e823639085ae647446eeef9b491489b3 to your computer and use it in GitHub Desktop.
Test data leak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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