weldermartins
Honored Contributor

Hello everyone, I found this alternative to reduce repeated code.

custoDF = (custoDF.withColumn('month', col('Nummes').cast('string'))
        .replace(months, subset=['month']))

image

View solution in original post