You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "黄龙龙 (JIRA)" <ji...@apache.org> on 2018/01/25 08:17:00 UTC
[jira] [Created] (SPARK-23212) Casts the column to a different data
type.
黄龙龙 created SPARK-23212:
---------------------------
Summary: Casts the column to a different data type.
Key: SPARK-23212
URL: https://issues.apache.org/jira/browse/SPARK-23212
Project: Spark
Issue Type: Question
Components: SparkR
Affects Versions: 2.1.0
Environment: I want to casts the column to a different data type.
{code:R}
train_data <- loadDF("./resultFile/train_data",
"csv",
header = TRUE)
train_data$x1 <- cast(train_data$x1, "double")
train_data$x2 <- cast(train_data$x2, "double")
train_data$x3 <- cast(train_data$x3, "double")
train_data$x4 <- cast(train_data$x4, "double")
{code}
But my dataset has so many columns need to be cast,is there exist a convenient way to do it?
Reporter: 黄龙龙
I want to casts the column to a different data type.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org