AI4M Course 3 Week 1 UNQ_11

I seem to manage to make it work by adding two additional lines at the beginning to enforce input y_train / y_val to be panda df, with the same index from corresponding X_train / X_val

y_train = pd.DataFrame(y_train, index = X_train.index)
y_val = pd.DataFrame(y_val, index = X_val.index)

After this, I can successfully generate y_treat/control_train/val, using example here

 y_treat_train = y_train.loc[X_treat_train.index]

This way, it works for unit test which uses array as input for y_train/val, and also works for later cell which uses df as input.

However, the autograder is still failing

I’d appreciate if someone could look into this myterious bug.

Thanks

Huan