reverse data table json export to newest on top

This commit is contained in:
simon 2021-07-11 22:46:34 +07:00
parent adde5b75c4
commit 2d6ef3a447
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import json
import numpy as np
import pandas as pd
import scipy # pylint: disable=unused-import
import scipy # pylint: disable=unused-import
from matplotlib import pyplot as plt
@ -435,6 +435,7 @@ class YearComparison:
self.axis['y_2'], self.axis['change']
)
data_rows = list(zipped)
data_rows.reverse()
data_rows.insert(0, avg_row)
json_dict = json.dumps({"data": data_rows})
# write to file