我的结果:

我的代码:
import与链接部分,略。
代码挺短的:

我的感想:
pipeline的语法真的是……
首先,记得要打引号,不要用等号
其次,检查一下 {}
最后,group是比较让人晕菜的...
{ $group: { _id: <expression>, <field1>: { <accumulator1> : <expression1> }, ... } }
贴一下参考过的帖子:MongoDB 聚合管道(Aggregation Pipeline)
import与链接部分,略。
代码挺短的:
pipeline的语法真的是……
首先,记得要打引号,不要用等号
其次,检查一下 {}
最后,group是比较让人晕菜的...
{ $group: { _id: <expression>, <field1>: { <accumulator1> : <expression1> }, ... } }
贴一下参考过的帖子:MongoDB 聚合管道(Aggregation Pipeline)
本文标题:麻瓜编程·python实战·3-3作业:绘制饼状图
本文链接:https://www.haomeiwen.com/subject/yvubsttx.html
网友评论