在对数据质量进行分析后,可以对数据的特征进行分析和计算,还可以通过图表显示数据的特征。采用分布分析、比较分析、统计分析、周期分析、贡献分析(帕累托分析)、相关分析、正态检验等方法对数据进行特征分析。
[En]
After the analysis of the quality of the data, the characteristics of the data can be analyzed and calculated, and the characteristics of the data can also be displayed by drawing charts. The characteristics of data are analyzed in the following ways: distribution analysis, comparative analysis, statistical analysis, periodic analysis, contribution analysis (Pareto analysis), correlation analysis, normality test.
分布分析能揭示数据的分布特征和分布类型。
- 对于定量数据,想要了解其分布形式是对称的还是非对称的,发现某些特大或特小的可以值,可以通过绘制频率分布直方图、茎叶图进行直观分析;
- 对于定性数据,可用饼图和条形图直观的显示分布情况。
下面我们通过具体的示例来演示如何对数据 进行定量和定性的分布情况进行分析。下面是需要用到的测试数据。这是数码相机在1998年整年的销售订单数据。下面是前10条数据:

- 对于定量数据分析
对数据进行定量分析,展示其分布情况最常用的方法就是直方图(Histogram)。这种图又称质量分布图,是一种统计报告图,由一系列高度不等的纵向条纹或线段表示数据分布的情况。一般用横轴表示数据类型,纵轴表示分布情况。
绘制直方图一般可以按照下面的步骤进行:
- 求极差。针对同一指标,极差越大,数据越不稳定
- 分组数据,并决定分点
- 绘制频率分布直方表
- 绘制频率分布直方图

绘制出的直方图如下所示。

- 对于定性数据分析
数据的定性分析往往按照变量的分类类型进行分组,最常用的表示其分布的方法是用饼图或条形图来描述定性变量的分布。例如,饼图显示数据系列中项目大小与项目总和的比率。饼图中的数据点显示为整个饼图的百分比。
[En]
The qualitative analysis of data is often grouped according to the classification type of variables, and the most commonly used method to show its distribution is pie chart or bar chart to describe the distribution of qualitative variables. For example, a pie chart shows the ratio of the size of items in a data series to the sum of items. The data points in the pie chart are displayed as a percentage of the entire pie chart.
下面以饼图举例说明,只需要将上面直方图代码中最后生成的DataFrame(result)直接使用饼图绘制出,即可。如下所示。

绘制出的饼图如下所示。

Original: https://www.cnblogs.com/collen7788/p/15593893.html
Author: 赵渝强老师
Title: 【赵渝强老师】利用Python完成数据分布特征的分析
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/57101/
转载文章受原作者版权保护。转载请注明原作者出处!