Gives solution for any Error occurs in any Programming Language, .Net Core 3.1, 3.0, C#,Asp.Net,Sqlserver,MVC,Java,Php,Html,Css,Jquery,errors and solutions,Latest News,Technology

Saturday 3 December 2016

Multiple Filters in a Spark DataFrame column using Scala

1 comment :

To filter a single DataFrame column with multiple values 

Filter using Spark.Sql 
DataFrame.registerTempTable("tempDfTable")
SqlContext.Sql("""Select * from tempDfTable where tempDfTable.column=1 and tempDfTable.column!=0 """)

Filter a DataFrame column directly
DataFrame.filter(col("column1").equalTo(1) && col("column1").equalTo(not(0)))

Filter using $
Before using $ symbol import namespace - import sql.implicits_
DataFrame.filter($("column1" == 1))

1 comment :

  1. Multiple Filters In A Spark Dataframe Column Using Scala >>>>> Download Now

    >>>>> Download Full

    Multiple Filters In A Spark Dataframe Column Using Scala >>>>> Download LINK

    >>>>> Download Now

    Multiple Filters In A Spark Dataframe Column Using Scala >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete