Use `"NaN"` instead of `np.nan`. This led to an issue in your previous imputer as far as I remember.