1

BEAUTIFY 助手很好地将 DAL 选择语句的结果显示为一个表。我想使用这个功能来显示一个熊猫数据框我已经尝试了几种将输入格式化为 BEAUTIFY 的方法,但它们都没有完成这项工作。有什么线索吗?

这是将 dict(key=column name) 列表返回到视图的控制器代码片段

d = [{'Cone': 1, 'Ctwo': 2,'Cthree':3}, {'Cone': 5, 'Ctwo': 10, 'Cthree': 20},  
 {'Cone': 100, 'Ctwo': 200, 'Cthree': 300},
 {'Cone': 1000, 'Ctwo': 2000, 'Cthree': 3000}]
return dict (rows=d)

视图是这样的:

{{extend 'layout.html'}}
{{=BEAUTIFY(response._vars)}}

结果页面未格式化为表格:行:圆锥:1 Cthree:3 Ctwo:2

感谢您的关注

4

0 回答 0