BS_THE_ANALYST
Databricks Partner

Hi @ManojkMohan ,

This section here:

df_ml
    .select("features", "label")
    .limit(10000)  # Optional: limit for performance
    .collect()

I don't see anywhere prior to this code block where you actually created "df_ml"? Has that dataframe even been created prior to this? If yes, are you certain both of those columns ["features""label"] are present in that dataframe.

All the best,
BS

View solution in original post