INNER CODE UNIT · Python

unique_amounts

alteryx/compose · composeml/conftest.py:39

    def unique_amounts(df):
        return df.amount.nunique()

    return unique_amounts


@pytest.fixture
def total_spent():
    data = [
        "customer_id,time,total_spent",
        "0,2019-01-01 08:00:00,9",
        "0,2019-01-01 08:30:00,8",
        "1,2019-01-01 09:00:00,7",
        "1,2019-01-01 09:30:00,6",
        "1,2019-01-01 10:00:00,5",
        "2,2019-01-01 10:30:00,4",
        "2,2019-01-01 11:00:00,3",
        "2,2019-01-01 11:30:00,2",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…