How can I convert a table of columns products and sales per Quarter to a table of 3 columns having Products, sales and Quarters using Pyspark. No date filed is defined in the table. The new Quarter column must be derived using the column name in the source table.
Sample data sets as below.
Source Tbale
Final Table
New contributor
Varun is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.