[Python] Pyspark - Convert yearWeek and Day into date

Discussão em 'Python' iniciado por Stack, Março 12, 2025.

  1. Stack

    Stack Membro Participativo

    I have two columns in pyspark dataframe in Databricks:

    1. YearWeek (2417)
    2. Day (0,1,2,3,4,5) - day of a week

    Need to create a column with a date. I was trying to do that in sql(date_add…) and also strptime in Python. SQL returns wrong data and strptime does not work with withColumn

    Continue reading...

Compartilhe esta Página