Forum Discussion
Mauro89
8 months agoSuper User
AI functions with PySpark error
Hi there, I have tried the AI functions capabilities in notebooks. The example with pandas dataframe worked for me. But the example as of the MS documentation with PySpark does not work. Example...
- 8 months ago
v-karpurapud sooooo. I turned out to be the issue was sitting infront of the screen not in the screen 😅
I was only importing the libary for pandas and was not award that the pyspark library is a different one. So for all ready this post, the solution is to import the correct relevant library.
import synapse.ml.aifunc as aifunc --> for Pandasimport synapse.ml.spark.aifunc as aifunc --> for PySparkNevertheless, thanks for the support here in this thread!v-karpurapud may I can take my own answer as solution?
Mauro89
8 months agoSuper User
v-karpurapud sooooo. I turned out to be the issue was sitting infront of the screen not in the screen 😅
I was only importing the libary for pandas and was not award that the pyspark library is a different one. So for all ready this post, the solution is to import the correct relevant library.
import synapse.ml.aifunc as aifunc --> for Pandas
import synapse.ml.spark.aifunc as aifunc --> for PySpark
Nevertheless, thanks for the support here in this thread!
v-karpurapud may I can take my own answer as solution?
v-karpurapud
8 months agoCommunity Support
Hi Mauro89
Glad to hear, you found the solution. Yeah, You can mark your own post as Solution.