INNER CODE UNIT · Python
unique_amounts_fn
alteryx/compose · composeml/conftest.py:38
def unique_amounts_fn():
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",