Need urgent help. I have setup data below as follows:
Now, I am trying to create a DF in pyspark
DataFrame[order_id: int, order_date: bigint, order_customer_id: int, order_status: string]
Row(order_id=1, order_date=1374735600000, order_customer_id=11599, order_status=u’CLOSED’)
The date is in the form of timestamp. So, I am trying to convert to YYYYMM
I tried using date_format by importing functions, however I am unable to use it.
from pyspark.sql import functions as f
Let me know how to convert timestamp to date format while working with - DataFrame and RDD.