From b0b575ead919a9d197174d6da112d4068e6b896f Mon Sep 17 00:00:00 2001 From: Timothy Pogue Date: Fri, 16 Sep 2022 00:02:27 -0600 Subject: [PATCH] change json serialize to split orient --- freqtrade/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/misc.py b/freqtrade/misc.py index b2aca5fd6..56b3fef0e 100644 --- a/freqtrade/misc.py +++ b/freqtrade/misc.py @@ -259,7 +259,7 @@ def dataframe_to_json(dataframe: pandas.DataFrame) -> str: :param dataframe: A pandas DataFrame :returns: A JSON string of the pandas DataFrame """ - return dataframe.to_json(orient='records') + return dataframe.to_json(orient='split') def json_to_dataframe(data: str) -> pandas.DataFrame: @@ -268,7 +268,7 @@ def json_to_dataframe(data: str) -> pandas.DataFrame: :param data: A JSON string :returns: A pandas DataFrame from the JSON string """ - dataframe = pandas.read_json(data) + dataframe = pandas.read_json(data, orient='split') if 'date' in dataframe.columns: dataframe['date'] = pandas.to_datetime(dataframe['date'], unit='ms', utc=True)