I have a dataset of daily sales number from e-commerce to apply VEC and VAR models on it.
The csv has only 2 columns as "data.event" and "data.lastUpdate".
- The "data.lastUpdate" column is the date. But in the format of
"2017-04-10T06:22:33.230Z". First I need to convert it into YMD format. I did it with string slicing. All pieces of advice are welcome if you know a better way.
- But the real problem is with the first column "data.event". The column has a title but in the column, there are the numbers of sales for each platform(Android, iOS, Rest, Total). I want to separate all this into new columns according to platforms and of course the total numbers. The sample lines are as below. How can I convert the lines into separated columns?
0 - {"ANDROID":6106,"REST":3322,"IOS":3974,"TOTAL"... 2017-04-10T06:22:33.230Z
10 - {"ANDROID":9,"TOTAL":9} 2017-03-31T05:28:23.081Z
The output I want to get is simply like:
Date Total Android Ios
25/6/2018 35757 12247 9065
24/6/2018 18821 7582 5693
Since this is the first time that I use stackoverflow sorry for my bad body.
Thanks in advance.