Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2016 09:55 PM
You can use udf to do that. But unfortunately , there's no builtin for this type conversion.
sqlContext.udf.register("float",lambda x:float(x))
from pyspark.sql.functions import expr
DF = rawdata.select('house name', expr(float('price'))