Forum Discussion
Anonymous
1 year agoNot applicable
Cannot convert numpy type object to spark type
I am new to MS fabric and trying to do a tutorial hands on - https://learn.microsoft.com/en-us/fabric/data-science/tutorial-data-science-batch-scoring I am running the following code to Instantia...
jchAgAr
1 year agoNew Member
MiSchroe - Thanks for clarifying the cause of the error. Pardon my ignorance, but could you explain how you would change the dtype from object to int64 in the context of this data science tutorial. Any help would be greatly appreciated as I'd like to better understand how this all fits together and complete it.
MiSchroe
1 year agoFrequent Visitor
In the notebook 3-train-evaluate I have changed the data type of the Exited column to int:
NOTE: In row 3 I load the table dbo.df_clean, because I have used a Lakehouse with the new schema. In the original tutorial the schema has to be omitted.
- Ali_Saghi7 months agoRegular Visitor
Great point. It solved my problem!
At first I went to convert all booleans to int, and of course it did not work. The problem was "Exited," as you mentioned already.