My approach by creating a function, def con(a): B = "" for i in a: if i != " " and i.lower() not in ['a','e','i','o','u']: B += "".join(i) return B const = udf(con) df.withColumn('new', const('message')).withColumn('count',length('new')).drop('message').show()
Nice🤙
Thanks Rahul
Use display(df) in databricks for good way of presenting
Noted
Keep helping ❤
Bro, please make Scala Spark and SQL spark interview videos.
Sure will try
My approach by creating a function,
def con(a):
B = ""
for i in a:
if i != " " and i.lower() not in ['a','e','i','o','u']:
B += "".join(i)
return B
const = udf(con)
df.withColumn('new', const('message')).withColumn('count',length('new')).drop('message').show()