def test_standaardize2(): testing_df = df.copy() with pytest.raises(Exception): clean.standardize(testing_df, 6,)
def test_standardize3(): testing_df = df.copy() testing_df['col4'] = pd.Series([1, 1, 1], index = [0, 1, 2]) result_df = testing_df.copy() clean.standardize(testing_df, 3) assert (((testing_df.fillna(0) == result_df.fillna(0)).all()).all()) == True
def test_standardize1(): testing_df = df.copy() result_df = df.copy() clean.standardize(testing_df, 0) result_df['col1'] = (result_df['col1'] - result_df['col1'].mean()) / result_df['col1'].std() assert (((testing_df.fillna(0) == result_df.fillna(0)).all()).all()) == True