After all the processing I was able to create below dataframe. The only problem with it is that the year is incorrect. The date is in decreasing order for each Location. So after 2015-01-15
it should be 2014-12-15
, not 2015-12-15
.
+--------------------+---------------+-------+
| Location | Date | Value |
+--------------------+---------------+-------+
| India | 2015-03-15 | -200|
| India | 2015-02-15 | 140 |
| India | 2015-01-15 | 155 |
| India | 2015-12-15 | 85 |
| India | 2015-11-15 | 45 |
| China | 2015-03-15 | 199 |
| China | 2015-02-15 | 164 |
| China | 2015-01-15 | 209 |
| China | 2015-12-15 | 24 |
| China | 2015-11-15 | 11 |
| Russia | 2015-03-15 | 48 |
| Russia | 2015-02-15 | 104 |
| Russia | 2015-01-15 | 106 |
| Russia | 2015-12-15 | -20 |
| Russia | 2015-11-15 | 10 |