Column name with dot spark

后端 未结 2 1261
天命终不由人
天命终不由人 2020-12-10 10:48

I am trying to take columns from a DataFrame and convert it to an RDD[Vector].

The problem is that I have columns with a \"dot\" in their n

2条回答
  •  半阙折子戏
    2020-12-10 11:27

    If your problem is the .(dot) in the column name, you could use `(backticks) to enclose the column name.

    df.select("`col0.1`")

提交回复
热议问题