Why this Databricks ML code gets stuck?

THIAM_HUATTAN
Valued Contributor

I could not paste the code here because of the some word not allowed, so I have to paste it elsewhere.

Below is OK:

https://justpaste.it/8xcr9

But below gets stuck:

https://justpaste.it/8nydt

and it keeps looping and running...