scala for spark - filtering out rows of a table bassed on a column : I'm a beginner with scala and am trying to filter out table rows based in column value.

I have a dataframe(spark):

    id  value 
    3     0
    3     1
    3     0
    4     1
    4     0
    4     0

I want to create a new dataframe deleting all rows with value!=0:

    id  value 
    3     0
    3     0
    4     0
    4     0

I figured the syntax should be something like this but couldn't get it right

    val newDataFrame = OldDataFrame.filter($"value"==0)
tnx!


