spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From evanzamir <>
Subject How to convert an ArrayType to DenseVector within DataFrame?
Date Tue, 30 Aug 2016 18:45:26 GMT
I have a DataFrame with a column containing a list of numeric features to be
used for a regression. When I run the regression, I get the following error:

*pyspark.sql.utils.IllegalArgumentException: 'requirement failed: Column
features must be of type but
was actually ArrayType(DoubleType,true).'
It would be nice if Spark could automatically convert the type, but assuming
that isn't possible, what's the easiest way for me to do the conversion?

View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe e-mail:

View raw message