Quantcast
Channel: How to covert dataframe datatypes to String? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by karthik manchala for How to covert dataframe datatypes to String?

You can do the following:df.withColumn("c_date", df.col("c_date").cast(StringType))

View Article



Answer by ROOT for How to covert dataframe datatypes to String?

In scala, we generally cast datatypes like this:df.select($"date".cast(StringType).as("new_date"))

View Article

How to covert dataframe datatypes to String?

I have a hive Table having Date and Timestamp datatypes. I am creating DataFrame using below java code:SparkConf conf = new...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images