I have a RDD entitled
res6: org.apache.spark.rdd.RDD[String] = MapPartitionsRDD at map at <console>:37
val name_clean = name.filter(_ != "name")
Each entry in the RDD is a string. So comparing it to "name" will always fail, as it's "name"+some digits.
What you need is
map to iterate over the RDD and return a new value for each entry. And that new value should be the string, without the first 4 characters, and converted to Long.
Putting that all together, we get
If you don't know the first four characters will be "name", you might want to check that first. What you need then depends on what you want to do with rows that don't have name as the first four, but something like