![ff027328c7819d539cbbfd0de577beda.png](https://i-blog.csdnimg.cn/blog_migrate/7610c09b7160e6efebd58a03c4ec5cb6.jpeg)
前言
本节我们学习使用Python的prettytable的用法,使用prettytable可以非常方便的使用表格形式打印统计数据。
一、基础知识
1.prettytable简介
PrettyTable是python中的一个第三方库,主要用来将数据格式化成表格形式显示。
2.安装
pip3 install PrettyTable
3.常用函数说明
![82cddc7003364c695838802f68a87aa1.png](https://i-blog.csdnimg.cn/blog_migrate/fd1783b511a5aabf1b593e798fa4b162.jpeg)
二、实例
1. QT Designer设计UI
复制“ pyqt5快速上手基础篇8-菜单栏、工具栏和状态栏“中image文件夹内容和combox.ui,并修改combox.ui名字为chart.ui,用Qt Designer打开如下所示: