Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +------+-----------+---------------+-------------+-------------+
- |MTH_ID| store_id | brand | brndSales| TotalSales|
- +------+-----------+---------------+-------------+-------------+
- |201801| 10941| 115| 80890.44900| 135799.66400|
- |201712| 10941| 123| 517440.74500| 975893.79000|
- |201711| 10941| 99 | 371501.92100| 574223.52300|
- |201710| 10941| 115| 552435.57800| 746912.06700|
- |201709| 10941| 115|1523492.60700|1871480.06800|
- |201708| 10941| 115|1027698.93600|1236544.50900|
- |201707| 10941| 33 |1469219.86900|1622949.53000|
- +------+-----------+---------------+-------------+-------------+
- |MTH_ID| store_id | brand | brndSales| TotalSales|switchdate
- +------+-----------+---------------+-------------+-------------+
- |201801| 10941| 115| 80890.44900| 135799.66400| 201712
- |201712| 10941| 123| 517440.74500| 975893.79000| 201711
- |201711| 10941| 99 | 371501.92100| 574223.52300| 201710
- |201710| 10941| 115| 552435.57800| 746912.06700| 201707
- |201709| 10941| 115|1523492.60700|1871480.06800| 201707
- |201708| 10941| 115|1027698.93600|1236544.50900| 201707
- |201707| 10941| 33 |1469219.86900|1622949.53000| 201706
- val data = Seq((201801, 10941, 115, 80890.44900, 135799.66400),(201712, 10941, 123, 517440.74500, 975893.79000),(201711, 10941, 99 , 371501.92100, 574223.52300),(201710, 10941, 115, 552435.57800, 746912.06700),(201709, 10941, 115,1523492.60700,1871480.06800),(201708, 10941, 115,1027698.93600,1236544.50900),(201707, 10941, 33 ,1469219.86900,1622949.53000)).toDF("MTH_ID", "store_id" ,"brand" ,"brndSales","TotalSales")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement