【发布时间】:2019-05-02 18:15:13
【问题描述】:
我有一个绘图对象(类型:类'plotly.graph_objs._figure.Figure'),我需要将其转换为可以从redis数据库存储和检索的其他数据类型。
我正在使用 python。请帮助我了解如何转换类型
【问题讨论】:
标签: python redis plotly plotly-dash
我有一个绘图对象(类型:类'plotly.graph_objs._figure.Figure'),我需要将其转换为可以从redis数据库存储和检索的其他数据类型。
我正在使用 python。请帮助我了解如何转换类型
【问题讨论】:
标签: python redis plotly plotly-dash
这可能是您需要的,来自文档here:
get_data(self, flatten=False)
Returns the JSON for the plot with non-data elements stripped.
Flattening may increase the utility of the result.
:param (bool) flatten: {'a': {'b': ''}} --> {'a.b': ''}
:returns: (dict|list) Depending on (flat|unflat)
【讨论】: