A gym wants to know what makes members cancel. Each row describes one member, and each label is 1 if they cancelled and 0 if they stayed.
Write push_directions(rows, cancelled, names).
names holds the column names, in the same order as each row.make_pipeline(StandardScaler(), LogisticRegression(max_iter=1000)).named_steps["logisticregression"].coef_). There is one row of coefficients, with one number per column.Return a dict that maps each column name to "cancel" for a positive coefficient or "stay" for a negative one. No coefficient is zero in the tests.