2019 年第 19 期
信息与电脑
China Computer & Communication
算法语言
基于 Python+Pandas+Matplotlib 的学生成绩
数据统计与图形输出实现
刘银波 边 静 蔡红梅 王 艳
(集宁师范学院,内蒙古 乌兰察布 012000)
摘 要:
笔者以集宁师范学院计算机相关专业的学生成绩为例,对学生的成绩数据进行了细致化分析,对
Python+Pandas+Matplotlib 进行了相关探讨,旨在提高计算机专业教学效果。在研究的过程中,利用 Python 的第
三方软件 Pandas 的数据处理功能,分析授课性质、时间、性别、生源地等方面与学生成绩之间的内在联系,并借助
Matplotlib 的可视化展示功能,将他们之间的关系通过图像的方式展现出来,对计算机专业学生的发展具有重要的意义。
关键词:
Python;Pandas;Matplotlib;学生成绩;数据统计;图形输出
中图分类
号:TP311.52 文献标识码:A 文章编号:1003-9767(2019)19-043-03
Realization of Statistics and Graphic Output of Students'Achievement Data
Based on Python+Pandas+Matplotlib
Liu Yinbo, Bian Jing, Cai Hongmei, Wang Yan
(Jining Normal University, Ulanchab Inner Mongolia 012000, China)
Abstract:
Taking the results of computer-related majors in Jining Normal University as an example, the author makes a detailed
analysis of the data of students'achievements, and makes a related discussion on Python+Pandas+Matplotlib, aiming at improving
the teaching effect of computer specialty. In the course of the research, using the data processing function of Pandas, a third-party
software of Python, to analyze the internal relationship between the nature of teaching, time, gender, students'origin and students'
performance, and with the help of Matplotlib's visual display function, to show the relationship between them through the way of
images, is of great significance to the development of computer majors.
Key words:
Python; Pandas; Matplotlib; student achievement; data statistics; graphic output
0 引言
Python 语言有跨平台、开源、通用等诸多特征,自从被
研发出来就得到社会各界的广泛应用。新时代背景下,社会
的不断进步推进了 Python 发展进程。由于 Python 容易掌握、
应用广泛和具有丰富的第三方数据库,受到了早期编程领域
的青睐。现阶段将 Python+Pandas+Matplotlib 编程的图表绘
制、数据汇总分析等功能应用在学生成绩分析上,将学生的
成绩数据可视化,有助于更全面地掌握学生的课程学习情况,
对学生及学校的发展具有重要的意义。
1 发展现状
Python 作为一种对数据解释型的编程语言,在 20 世纪 90
年代就已经被研发,但是其在 2000 年后才得到迅速发展。目
前,Python 已广泛应用在云计算、Web 研发、人工智能、科
学运算、金融图形 GUI 等领域
[1-3]
。由于 Python 语言结构清
晰明确、拥有丰富的第三方库、技术相对将成熟、具有强大
的科学计算及数据分析能力,所以其利用效率远超过 C 语言、
C++ 语言及 Java。目前,Python 发展中涉及的第三方库主要
有 NumPy、SciPy、Matplotlib、Enthought librarys、pandas 等。
在数据分析处理领域,通过运用 Python 编程语言对各种数据
进行汇总、筛选、处理分析,有助于为应用行业的战略性发展
提供借鉴。另外,Python 在学生成绩统计、校园一卡通数据分析、
实验数据的统计和分析等方面也取得了不错的发展成绩。
2 学生成绩数据统计处理、分析
采用合适的数据结构对数据进行表达,运用合适的算
法对数据进行分析和处理是计算机所有程序开发的重要基
础。Python 本身拥有丰富的数据库,能为第三方库提供相关
基金项目:
集宁师范学院自然科学研究一般项目“基于 Python 的数据分析及可视化研究”(项目编号:jsky2018028)。
作者简介:
刘银波 (1990—),女,辽宁庄河人,研究生,讲师。研究方向:计算机先进控制策略研究。
— 43 —
- 1
- 2
前往页