Skip to content
Advertisement

Facing issue while writing SQL in pyspark

I am trying to convert below SQL code to pyspark. Can someone please help me

Here, util, count, procs are column names.

while coding in pyspark, i can create a new column ‘col’ like this:

Advertisement

Answer

You can use when for doing the equivalent of update:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement