黄龙龙 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to