get specific row from spark dataframe

前端 未结 9 1707
闹比i
闹比i 2020-12-17 07:58

Is there any alternative for df[100, c(\"column\")] in scala spark data frames. I want to select specific row from a column of spark data frame. for example

9条回答
  •  旧巷少年郎
    2020-12-17 08:40

    you can simply do that by using below single line of code

    val arr = df.select("column").collect()(99)
    

提交回复
热议问题