feat(商务大数据分析): 添加新课程的示例代码和数据- 新增 aqi.csv 数据文件,包含 2020年空气质量数据

- 添加商品销售数据处理和可视化示例代码- 添加房价数据处理和可视化示
This commit is contained in:
dev_xulongjin 2025-05-11 16:54:32 +08:00
parent b4ef64314b
commit 265128110d
6 changed files with 13017 additions and 0 deletions

View File

@ -0,0 +1,272 @@
日期,AQI,质量等级,PM2.5含量ppm,PM10含量ppm,SO2含量ppm,CO含量ppm,NO2含量ppm,O3_8h含量ppm
2020/1/1,79,,58,64,8,0.7,57,23
2020/1/2,112,轻度污染,84,73,10,1.0,71,7
2020/1/3,68,,49,51,7,0.8,49,3
2020/1/4,90,,67,57,7,1.2,53,18
2020/1/5,110,轻度污染,83,65,7,1.0,51,46
2020/1/6,65,,47,58,6,1.0,43,6
2020/1/7,50,,18,19,5,1.5,40,43
2020/1/8,69,,50,49,7,0.9,39,45
2020/1/9,69,,50,40,6,0.9,47,33
2020/1/10,57,,34,28,5,0.8,45,21
2020/1/11,47,,27,21,6,0.7,37,39
2020/1/12,125,轻度污染,95,74,8,1.0,44,71
2020/1/13,148,轻度污染,113,94,9,1.3,59,53
2020/1/14,172,中度污染,130,114,12,1.4,62,65
2020/1/15,113,轻度污染,85,62,8,1.2,50,32
2020/1/16,55,,16,14,5,0.8,44,38
2020/1/17,82,,60,43,6,0.9,42,25
2020/1/18,88,,65,55,6,0.8,51,31
2020/1/19,112,轻度污染,84,77,10,1.0,53,77
2020/1/20,127,轻度污染,96,99,14,1.2,70,90
2020/1/21,203,重度污染,153,113,9,1.3,43,60
2020/1/22,148,轻度污染,113,77,6,1.2,43,30
2020/1/23,58,,41,37,5,0.6,26,42
2020/1/24,79,,58,57,6,0.7,18,78
2020/1/25,40,,26,40,5,0.5,17,61
2020/1/26,29,,20,17,5,0.5,21,56
2020/1/27,70,,51,41,5,0.8,21,57
2020/1/28,95,,71,65,6,0.7,19,70
2020/1/29,84,,62,60,10,0.7,25,77
2020/1/30,128,轻度污染,97,85,9,1.0,26,103
2020/1/31,125,轻度污染,95,82,10,1.0,43,94
2020/2/1,75,,55,49,7,0.7,21,102
2020/2/2,42,,28,30,8,0.5,26,84
2020/2/3,109,轻度污染,82,68,9,0.9,30,109
2020/2/4,92,,68,60,7,0.8,22,103
2020/2/5,65,,47,44,7,0.8,19,106
2020/2/6,38,,22,25,5,0.6,11,75
2020/2/7,33,,14,16,5,0.6,12,66
2020/2/8,62,,44,40,5,0.6,22,45
2020/2/9,53,,37,34,7,0.6,25,79
2020/2/10,48,,33,36,8,0.7,32,69
2020/2/11,35,,24,26,6,0.7,20,47
2020/2/12,43,,30,34,5,0.9,23,56
2020/2/13,22,,15,18,5,0.8,15,30
2020/2/14,23,,14,17,5,0.8,18,32
2020/2/15,27,,8,10,5,0.7,14,53
2020/2/16,42,,21,31,7,0.5,11,83
2020/2/17,45,,19,33,9,0.5,18,90
2020/2/18,49,,27,32,8,0.6,28,97
2020/2/19,55,,39,37,7,0.6,25,76
2020/2/20,64,,46,43,8,0.7,25,111
2020/2/21,62,,44,41,9,0.6,31,66
2020/2/22,83,,61,89,10,0.9,42,94
2020/2/23,92,,68,107,7,0.8,25,109
2020/2/24,85,,63,87,8,1.0,44,84
2020/2/25,95,,71,79,6,1.2,44,42
2020/2/26,50,,35,43,4,0.7,19,87
2020/2/27,70,,51,68,4,0.8,19,93
2020/2/28,38,,26,25,4,0.7,28,59
2020/2/29,40,,28,21,4,0.8,29,41
2020/3/1,50,,35,29,5,0.7,27,58
2020/3/2,54,,38,37,5,0.8,22,87
2020/3/3,72,,52,49,8,1.0,44,64
2020/3/4,85,,63,58,6,0.9,33,104
2020/3/5,56,,31,41,8,0.7,24,107
2020/3/6,64,,46,43,7,0.6,35,84
2020/3/7,67,,48,53,6,0.9,43,75
2020/3/8,68,,49,52,7,0.8,29,105
2020/3/9,37,,19,25,5,0.7,29,47
2020/3/10,62,,44,38,5,1.0,32,74
2020/3/11,67,,48,68,7,1.0,39,113
2020/3/12,68,,49,68,7,0.8,44,95
2020/3/13,67,,48,70,7,0.9,45,46
2020/3/14,52,,24,53,7,0.5,40,96
2020/3/15,77,,38,86,12,0.8,61,109
2020/3/16,70,,51,80,10,0.7,47,108
2020/3/17,74,,43,77,10,0.7,59,122
2020/3/18,70,,46,79,16,1.1,56,123
2020/3/19,77,,35,104,14,0.9,47,78
2020/3/20,68,,37,86,12,0.7,53,112
2020/3/21,67,,42,67,10,0.9,53,87
2020/3/22,55,,31,60,6,0.8,33,102
2020/3/23,42,,19,41,8,0.5,33,83
2020/3/24,65,,26,43,9,0.5,33,118
2020/3/25,63,,30,48,9,0.8,50,66
2020/3/26,57,,27,35,6,0.9,45,24
2020/3/27,34,,12,27,6,0.6,27,62
2020/3/28,39,,11,24,5,0.4,20,78
2020/3/29,35,,22,27,6,0.7,28,57
2020/3/30,38,,26,24,5,0.7,29,60
2020/3/31,48,,28,34,5,0.7,38,40
2020/4/1,45,,23,28,5,0.7,36,90
2020/4/2,54,,30,57,7,0.7,39,101
2020/4/3,67,,45,63,8,0.8,53,109
2020/4/4,93,,60,87,11,1.1,74,125
2020/4/5,56,,20,61,7,0.6,27,94
2020/4/6,65,,31,50,8,0.6,36,117
2020/4/7,55,,30,50,9,0.6,43,105
2020/4/8,62,,29,55,9,0.5,45,114
2020/4/9,85,,42,68,10,0.6,43,142
2020/4/10,70,,43,65,8,0.7,32,124
2020/4/11,37,,23,25,5,0.7,27,73
2020/4/12,70,,31,52,7,0.6,26,123
2020/4/13,85,,39,69,9,0.6,54,141
2020/4/14,81,,42,64,10,0.7,49,137
2020/4/15,75,,30,64,19,1.1,60,116
2020/4/16,75,,33,71,12,0.8,60,111
2020/4/17,79,,53,94,17,0.9,63,75
2020/4/18,66,,47,82,9,0.8,41,112
2020/4/19,51,,19,24,5,0.6,31,101
2020/4/20,65,,25,37,9,0.8,52,110
2020/4/21,45,,23,40,7,0.5,34,89
2020/4/22,63,,29,45,7,0.4,41,115
2020/4/23,70,,40,68,8,0.5,54,124
2020/4/24,85,,30,69,15,0.7,68,130
2020/4/25,73,,26,70,22,1.0,58,120
2020/4/26,77,,36,76,14,0.8,47,132
2020/4/27,51,,25,49,7,0.6,28,101
2020/4/28,81,,25,45,7,0.5,34,137
2020/4/29,112,轻度污染,34,69,11,0.6,43,173
2020/4/30,90,,43,80,12,0.8,55,148
2020/5/1,54,,38,53,8,0.9,34,88
2020/5/2,80,,39,60,13,1.2,35,136
2020/5/3,90,,44,72,22,1.5,52,147
2020/5/4,132,轻度污染,43,69,18,1.4,40,195
2020/5/5,49,,34,49,6,1.0,36,46
2020/5/6,45,,29,44,5,0.8,29,89
2020/5/7,72,,28,50,6,0.7,24,126
2020/5/8,40,,24,40,6,0.8,26,44
2020/5/9,36,,25,27,5,0.6,21,72
2020/5/10,55,,27,32,6,0.9,43,105
2020/5/11,87,,23,55,8,0.8,44,144
2020/5/12,77,,15,61,12,0.6,46,132
2020/5/13,133,轻度污染,31,79,10,0.6,37,196
2020/5/14,58,,35,52,7,0.8,29,109
2020/5/15,44,,18,26,8,0.9,33,87
2020/5/16,52,,22,35,11,1.0,41,100
2020/5/17,83,,24,45,14,1.2,36,139
2020/5/18,60,,19,64,8,0.7,30,112
2020/5/19,92,,29,70,15,0.9,52,150
2020/5/20,127,轻度污染,35,71,13,0.7,35,189
2020/5/21,105,轻度污染,23,53,10,0.6,23,165
2020/5/22,75,,16,31,6,0.6,16,130
2020/5/23,85,,21,41,7,0.6,23,142
2020/5/24,130,轻度污染,39,70,12,0.9,35,193
2020/5/25,57,,40,57,10,0.9,31,103
2020/5/26,75,,26,35,6,0.9,25,129
2020/5/27,109,轻度污染,26,49,9,1.0,34,169
2020/5/28,99,,41,66,14,1.2,44,158
2020/5/29,51,,33,51,10,0.7,34,99
2020/5/30,46,,18,25,5,0.6,18,91
2020/5/31,80,,25,49,9,0.9,33,135
2020/6/1,116,轻度污染,34,62,7,0.8,31,177
2020/6/2,65,,23,43,9,0.9,34,117
2020/6/3,48,,14,27,7,0.8,24,95
2020/6/4,47,,12,28,8,0.8,22,94
2020/6/5,36,,10,17,5,0.7,25,71
2020/6/6,85,,15,26,6,0.7,19,142
2020/6/7,80,,16,37,7,0.5,17,135
2020/6/8,57,,28,44,7,0.5,14,108
2020/6/9,60,,18,31,6,0.6,15,112
2020/6/10,45,,22,36,7,0.9,36,82
2020/6/11,68,,33,48,6,1.0,36,121
2020/6/12,39,,9,28,6,0.8,27,77
2020/6/13,53,,11,23,6,0.8,35,103
2020/6/14,39,,12,23,6,0.7,27,78
2020/6/15,44,,7,19,6,0.7,35,46
2020/6/16,50,,20,29,5,0.8,22,99
2020/6/17,46,,17,43,7,0.8,26,91
2020/6/18,34,,16,25,5,0.7,23,67
2020/6/19,60,,13,25,6,0.8,28,111
2020/6/20,48,,13,22,6,0.7,19,95
2020/6/21,41,,5,10,5,0.6,20,82
2020/6/22,34,,8,10,5,0.6,20,67
2020/6/23,35,,9,16,5,0.9,28,40
2020/6/24,48,,18,34,8,0.9,34,96
2020/6/25,71,,26,41,8,1.0,28,125
2020/6/26,45,,13,28,6,0.6,18,89
2020/6/27,35,,12,21,5,0.7,28,63
2020/6/28,47,,11,18,5,0.7,14,93
2020/6/29,41,,8,18,6,0.7,19,81
2020/6/30,83,,16,28,6,0.7,26,139
2020/7/1,126,轻度污染,33,55,6,0.7,18,188
2020/7/2,47,,18,35,6,0.6,18,94
2020/7/3,46,,10,21,5,0.6,19,91
2020/7/4,60,,20,34,6,0.7,18,112
2020/7/5,35,,11,21,6,0.7,28,45
2020/7/6,35,,8,13,5,0.7,28,46
2020/7/7,55,,14,25,9,1.1,36,105
2020/7/8,80,,29,43,8,1.3,26,136
2020/7/9,50,,22,39,5,0.8,17,99
2020/7/10,70,,19,31,5,0.6,12,124
2020/7/11,30,,13,23,5,0.7,17,59
2020/7/12,42,,15,41,9,0.8,33,64
2020/7/13,29,,11,15,5,0.6,23,58
2020/7/14,46,,14,25,6,0.7,21,91
2020/7/15,46,,7,13,5,0.7,21,91
2020/7/16,39,,7,12,5,0.6,21,78
2020/7/17,32,,15,24,6,0.6,22,63
2020/7/18,49,,18,32,6,0.8,39,20
2020/7/19,37,,13,19,6,1.0,29,67
2020/7/20,49,,21,30,7,0.7,25,98
2020/7/21,48,,20,32,6,0.7,26,96
2020/7/22,55,,14,37,6,0.6,21,105
2020/7/23,38,,10,27,7,0.6,22,76
2020/7/24,44,,12,19,5,0.7,35,75
2020/7/25,58,,13,31,7,0.7,39,109
2020/7/26,70,,26,44,7,0.7,26,124
2020/7/27,53,,22,39,7,1.1,42,44
2020/7/28,33,,11,23,6,0.7,26,64
2020/7/29,56,,28,48,6,0.9,24,107
2020/7/30,81,,24,45,7,0.9,25,137
2020/7/31,50,,9,33,7,0.5,24,99
2020/8/1,99,,15,33,8,0.6,23,158
2020/8/2,65,,25,47,7,0.9,40,117
2020/8/3,55,,18,38,6,0.7,23,106
2020/8/4,48,,9,30,6,0.6,20,95
2020/8/5,60,,23,51,7,1.0,41,111
2020/8/6,36,,8,27,6,0.7,20,72
2020/8/7,36,,10,27,6,0.6,19,71
2020/8/8,37,,16,36,7,0.6,24,73
2020/8/9,35,,18,33,7,0.8,28,66
2020/8/10,30,,11,20,7,0.8,24,53
2020/8/11,44,,15,27,6,0.7,20,88
2020/8/12,27,,8,23,6,0.6,16,53
2020/8/13,40,,11,26,7,0.7,24,80
2020/8/14,46,,10,28,7,0.6,21,91
2020/8/15,75,,15,34,7,0.6,28,129
2020/8/16,96,,19,43,8,0.8,29,155
2020/8/17,91,,21,45,8,0.7,23,149
2020/8/18,77,,30,55,8,0.5,18,132
2020/8/19,77,,26,49,8,0.6,25,132
2020/8/20,130,轻度污染,21,41,8,0.8,30,193
2020/8/21,88,,27,45,8,0.9,28,145
2020/8/22,87,,31,53,7,0.8,22,144
2020/8/23,112,轻度污染,35,59,8,0.6,17,173
2020/8/24,91,,33,58,10,0.8,28,149
2020/8/25,64,,24,43,9,0.6,26,116
2020/8/26,72,,26,41,8,0.7,20,126
2020/8/27,75,,15,29,8,0.6,21,129
2020/8/28,54,,26,53,12,0.9,39,104
2020/8/29,82,,28,53,11,1.0,35,138
2020/8/30,100,,24,40,9,0.8,32,160
2020/8/31,55,,23,43,10,0.9,44,87
2020/9/1,49,,20,37,10,0.9,39,78
2020/9/2,50,,21,35,8,0.7,26,99
2020/9/3,89,,24,49,11,0.7,45,146
2020/9/4,85,,24,56,8,0.7,42,141
2020/9/5,104,轻度污染,31,62,14,0.8,42,164
2020/9/6,116,轻度污染,26,54,10,0.6,38,177
2020/9/7,114,轻度污染,34,65,11,0.8,58,175
2020/9/8,101,轻度污染,38,81,12,0.9,58,161
2020/9/9,86,,46,82,13,0.9,65,143
2020/9/10,69,,50,73,10,1.0,52,84
2020/9/11,75,,24,43,8,0.9,31,130
2020/9/12,72,,26,46,12,0.9,41,126
2020/9/13,67,,29,48,9,0.8,30,120
2020/9/14,89,,33,53,9,0.8,29,146
2020/9/15,38,,16,24,7,0.8,30,64
2020/9/16,52,,19,27,8,0.8,36,102
2020/9/17,49,,15,22,7,0.7,28,98
2020/9/18,43,,14,20,7,0.5,20,86
2020/9/19,70,,21,36,9,0.7,27,124
2020/9/20,90,,26,44,9,0.7,28,148
2020/9/21,50,,19,37,9,0.6,29,100
2020/9/22,55,,31,36,8,0.7,29,105
2020/9/23,46,,17,33,7,0.7,33,92
2020/9/24,60,,27,51,10,0.7,48,106
2020/9/25,62,,21,47,9,0.7,43,114
2020/9/26,74,,29,53,9,0.7,37,128
2020/9/27,60,,18,41,9,0.6,25,112
1 日期 AQI 质量等级 PM2.5含量(ppm) PM10含量(ppm) SO2含量(ppm) CO含量(ppm) NO2含量(ppm) O3_8h含量(ppm)
2 2020/1/1 79 58 64 8 0.7 57 23
3 2020/1/2 112 轻度污染 84 73 10 1.0 71 7
4 2020/1/3 68 49 51 7 0.8 49 3
5 2020/1/4 90 67 57 7 1.2 53 18
6 2020/1/5 110 轻度污染 83 65 7 1.0 51 46
7 2020/1/6 65 47 58 6 1.0 43 6
8 2020/1/7 50 18 19 5 1.5 40 43
9 2020/1/8 69 50 49 7 0.9 39 45
10 2020/1/9 69 50 40 6 0.9 47 33
11 2020/1/10 57 34 28 5 0.8 45 21
12 2020/1/11 47 27 21 6 0.7 37 39
13 2020/1/12 125 轻度污染 95 74 8 1.0 44 71
14 2020/1/13 148 轻度污染 113 94 9 1.3 59 53
15 2020/1/14 172 中度污染 130 114 12 1.4 62 65
16 2020/1/15 113 轻度污染 85 62 8 1.2 50 32
17 2020/1/16 55 16 14 5 0.8 44 38
18 2020/1/17 82 60 43 6 0.9 42 25
19 2020/1/18 88 65 55 6 0.8 51 31
20 2020/1/19 112 轻度污染 84 77 10 1.0 53 77
21 2020/1/20 127 轻度污染 96 99 14 1.2 70 90
22 2020/1/21 203 重度污染 153 113 9 1.3 43 60
23 2020/1/22 148 轻度污染 113 77 6 1.2 43 30
24 2020/1/23 58 41 37 5 0.6 26 42
25 2020/1/24 79 58 57 6 0.7 18 78
26 2020/1/25 40 26 40 5 0.5 17 61
27 2020/1/26 29 20 17 5 0.5 21 56
28 2020/1/27 70 51 41 5 0.8 21 57
29 2020/1/28 95 71 65 6 0.7 19 70
30 2020/1/29 84 62 60 10 0.7 25 77
31 2020/1/30 128 轻度污染 97 85 9 1.0 26 103
32 2020/1/31 125 轻度污染 95 82 10 1.0 43 94
33 2020/2/1 75 55 49 7 0.7 21 102
34 2020/2/2 42 28 30 8 0.5 26 84
35 2020/2/3 109 轻度污染 82 68 9 0.9 30 109
36 2020/2/4 92 68 60 7 0.8 22 103
37 2020/2/5 65 47 44 7 0.8 19 106
38 2020/2/6 38 22 25 5 0.6 11 75
39 2020/2/7 33 14 16 5 0.6 12 66
40 2020/2/8 62 44 40 5 0.6 22 45
41 2020/2/9 53 37 34 7 0.6 25 79
42 2020/2/10 48 33 36 8 0.7 32 69
43 2020/2/11 35 24 26 6 0.7 20 47
44 2020/2/12 43 30 34 5 0.9 23 56
45 2020/2/13 22 15 18 5 0.8 15 30
46 2020/2/14 23 14 17 5 0.8 18 32
47 2020/2/15 27 8 10 5 0.7 14 53
48 2020/2/16 42 21 31 7 0.5 11 83
49 2020/2/17 45 19 33 9 0.5 18 90
50 2020/2/18 49 27 32 8 0.6 28 97
51 2020/2/19 55 39 37 7 0.6 25 76
52 2020/2/20 64 46 43 8 0.7 25 111
53 2020/2/21 62 44 41 9 0.6 31 66
54 2020/2/22 83 61 89 10 0.9 42 94
55 2020/2/23 92 68 107 7 0.8 25 109
56 2020/2/24 85 63 87 8 1.0 44 84
57 2020/2/25 95 71 79 6 1.2 44 42
58 2020/2/26 50 35 43 4 0.7 19 87
59 2020/2/27 70 51 68 4 0.8 19 93
60 2020/2/28 38 26 25 4 0.7 28 59
61 2020/2/29 40 28 21 4 0.8 29 41
62 2020/3/1 50 35 29 5 0.7 27 58
63 2020/3/2 54 38 37 5 0.8 22 87
64 2020/3/3 72 52 49 8 1.0 44 64
65 2020/3/4 85 63 58 6 0.9 33 104
66 2020/3/5 56 31 41 8 0.7 24 107
67 2020/3/6 64 46 43 7 0.6 35 84
68 2020/3/7 67 48 53 6 0.9 43 75
69 2020/3/8 68 49 52 7 0.8 29 105
70 2020/3/9 37 19 25 5 0.7 29 47
71 2020/3/10 62 44 38 5 1.0 32 74
72 2020/3/11 67 48 68 7 1.0 39 113
73 2020/3/12 68 49 68 7 0.8 44 95
74 2020/3/13 67 48 70 7 0.9 45 46
75 2020/3/14 52 24 53 7 0.5 40 96
76 2020/3/15 77 38 86 12 0.8 61 109
77 2020/3/16 70 51 80 10 0.7 47 108
78 2020/3/17 74 43 77 10 0.7 59 122
79 2020/3/18 70 46 79 16 1.1 56 123
80 2020/3/19 77 35 104 14 0.9 47 78
81 2020/3/20 68 37 86 12 0.7 53 112
82 2020/3/21 67 42 67 10 0.9 53 87
83 2020/3/22 55 31 60 6 0.8 33 102
84 2020/3/23 42 19 41 8 0.5 33 83
85 2020/3/24 65 26 43 9 0.5 33 118
86 2020/3/25 63 30 48 9 0.8 50 66
87 2020/3/26 57 27 35 6 0.9 45 24
88 2020/3/27 34 12 27 6 0.6 27 62
89 2020/3/28 39 11 24 5 0.4 20 78
90 2020/3/29 35 22 27 6 0.7 28 57
91 2020/3/30 38 26 24 5 0.7 29 60
92 2020/3/31 48 28 34 5 0.7 38 40
93 2020/4/1 45 23 28 5 0.7 36 90
94 2020/4/2 54 30 57 7 0.7 39 101
95 2020/4/3 67 45 63 8 0.8 53 109
96 2020/4/4 93 60 87 11 1.1 74 125
97 2020/4/5 56 20 61 7 0.6 27 94
98 2020/4/6 65 31 50 8 0.6 36 117
99 2020/4/7 55 30 50 9 0.6 43 105
100 2020/4/8 62 29 55 9 0.5 45 114
101 2020/4/9 85 42 68 10 0.6 43 142
102 2020/4/10 70 43 65 8 0.7 32 124
103 2020/4/11 37 23 25 5 0.7 27 73
104 2020/4/12 70 31 52 7 0.6 26 123
105 2020/4/13 85 39 69 9 0.6 54 141
106 2020/4/14 81 42 64 10 0.7 49 137
107 2020/4/15 75 30 64 19 1.1 60 116
108 2020/4/16 75 33 71 12 0.8 60 111
109 2020/4/17 79 53 94 17 0.9 63 75
110 2020/4/18 66 47 82 9 0.8 41 112
111 2020/4/19 51 19 24 5 0.6 31 101
112 2020/4/20 65 25 37 9 0.8 52 110
113 2020/4/21 45 23 40 7 0.5 34 89
114 2020/4/22 63 29 45 7 0.4 41 115
115 2020/4/23 70 40 68 8 0.5 54 124
116 2020/4/24 85 30 69 15 0.7 68 130
117 2020/4/25 73 26 70 22 1.0 58 120
118 2020/4/26 77 36 76 14 0.8 47 132
119 2020/4/27 51 25 49 7 0.6 28 101
120 2020/4/28 81 25 45 7 0.5 34 137
121 2020/4/29 112 轻度污染 34 69 11 0.6 43 173
122 2020/4/30 90 43 80 12 0.8 55 148
123 2020/5/1 54 38 53 8 0.9 34 88
124 2020/5/2 80 39 60 13 1.2 35 136
125 2020/5/3 90 44 72 22 1.5 52 147
126 2020/5/4 132 轻度污染 43 69 18 1.4 40 195
127 2020/5/5 49 34 49 6 1.0 36 46
128 2020/5/6 45 29 44 5 0.8 29 89
129 2020/5/7 72 28 50 6 0.7 24 126
130 2020/5/8 40 24 40 6 0.8 26 44
131 2020/5/9 36 25 27 5 0.6 21 72
132 2020/5/10 55 27 32 6 0.9 43 105
133 2020/5/11 87 23 55 8 0.8 44 144
134 2020/5/12 77 15 61 12 0.6 46 132
135 2020/5/13 133 轻度污染 31 79 10 0.6 37 196
136 2020/5/14 58 35 52 7 0.8 29 109
137 2020/5/15 44 18 26 8 0.9 33 87
138 2020/5/16 52 22 35 11 1.0 41 100
139 2020/5/17 83 24 45 14 1.2 36 139
140 2020/5/18 60 19 64 8 0.7 30 112
141 2020/5/19 92 29 70 15 0.9 52 150
142 2020/5/20 127 轻度污染 35 71 13 0.7 35 189
143 2020/5/21 105 轻度污染 23 53 10 0.6 23 165
144 2020/5/22 75 16 31 6 0.6 16 130
145 2020/5/23 85 21 41 7 0.6 23 142
146 2020/5/24 130 轻度污染 39 70 12 0.9 35 193
147 2020/5/25 57 40 57 10 0.9 31 103
148 2020/5/26 75 26 35 6 0.9 25 129
149 2020/5/27 109 轻度污染 26 49 9 1.0 34 169
150 2020/5/28 99 41 66 14 1.2 44 158
151 2020/5/29 51 33 51 10 0.7 34 99
152 2020/5/30 46 18 25 5 0.6 18 91
153 2020/5/31 80 25 49 9 0.9 33 135
154 2020/6/1 116 轻度污染 34 62 7 0.8 31 177
155 2020/6/2 65 23 43 9 0.9 34 117
156 2020/6/3 48 14 27 7 0.8 24 95
157 2020/6/4 47 12 28 8 0.8 22 94
158 2020/6/5 36 10 17 5 0.7 25 71
159 2020/6/6 85 15 26 6 0.7 19 142
160 2020/6/7 80 16 37 7 0.5 17 135
161 2020/6/8 57 28 44 7 0.5 14 108
162 2020/6/9 60 18 31 6 0.6 15 112
163 2020/6/10 45 22 36 7 0.9 36 82
164 2020/6/11 68 33 48 6 1.0 36 121
165 2020/6/12 39 9 28 6 0.8 27 77
166 2020/6/13 53 11 23 6 0.8 35 103
167 2020/6/14 39 12 23 6 0.7 27 78
168 2020/6/15 44 7 19 6 0.7 35 46
169 2020/6/16 50 20 29 5 0.8 22 99
170 2020/6/17 46 17 43 7 0.8 26 91
171 2020/6/18 34 16 25 5 0.7 23 67
172 2020/6/19 60 13 25 6 0.8 28 111
173 2020/6/20 48 13 22 6 0.7 19 95
174 2020/6/21 41 5 10 5 0.6 20 82
175 2020/6/22 34 8 10 5 0.6 20 67
176 2020/6/23 35 9 16 5 0.9 28 40
177 2020/6/24 48 18 34 8 0.9 34 96
178 2020/6/25 71 26 41 8 1.0 28 125
179 2020/6/26 45 13 28 6 0.6 18 89
180 2020/6/27 35 12 21 5 0.7 28 63
181 2020/6/28 47 11 18 5 0.7 14 93
182 2020/6/29 41 8 18 6 0.7 19 81
183 2020/6/30 83 16 28 6 0.7 26 139
184 2020/7/1 126 轻度污染 33 55 6 0.7 18 188
185 2020/7/2 47 18 35 6 0.6 18 94
186 2020/7/3 46 10 21 5 0.6 19 91
187 2020/7/4 60 20 34 6 0.7 18 112
188 2020/7/5 35 11 21 6 0.7 28 45
189 2020/7/6 35 8 13 5 0.7 28 46
190 2020/7/7 55 14 25 9 1.1 36 105
191 2020/7/8 80 29 43 8 1.3 26 136
192 2020/7/9 50 22 39 5 0.8 17 99
193 2020/7/10 70 19 31 5 0.6 12 124
194 2020/7/11 30 13 23 5 0.7 17 59
195 2020/7/12 42 15 41 9 0.8 33 64
196 2020/7/13 29 11 15 5 0.6 23 58
197 2020/7/14 46 14 25 6 0.7 21 91
198 2020/7/15 46 7 13 5 0.7 21 91
199 2020/7/16 39 7 12 5 0.6 21 78
200 2020/7/17 32 15 24 6 0.6 22 63
201 2020/7/18 49 18 32 6 0.8 39 20
202 2020/7/19 37 13 19 6 1.0 29 67
203 2020/7/20 49 21 30 7 0.7 25 98
204 2020/7/21 48 20 32 6 0.7 26 96
205 2020/7/22 55 14 37 6 0.6 21 105
206 2020/7/23 38 10 27 7 0.6 22 76
207 2020/7/24 44 12 19 5 0.7 35 75
208 2020/7/25 58 13 31 7 0.7 39 109
209 2020/7/26 70 26 44 7 0.7 26 124
210 2020/7/27 53 22 39 7 1.1 42 44
211 2020/7/28 33 11 23 6 0.7 26 64
212 2020/7/29 56 28 48 6 0.9 24 107
213 2020/7/30 81 24 45 7 0.9 25 137
214 2020/7/31 50 9 33 7 0.5 24 99
215 2020/8/1 99 15 33 8 0.6 23 158
216 2020/8/2 65 25 47 7 0.9 40 117
217 2020/8/3 55 18 38 6 0.7 23 106
218 2020/8/4 48 9 30 6 0.6 20 95
219 2020/8/5 60 23 51 7 1.0 41 111
220 2020/8/6 36 8 27 6 0.7 20 72
221 2020/8/7 36 10 27 6 0.6 19 71
222 2020/8/8 37 16 36 7 0.6 24 73
223 2020/8/9 35 18 33 7 0.8 28 66
224 2020/8/10 30 11 20 7 0.8 24 53
225 2020/8/11 44 15 27 6 0.7 20 88
226 2020/8/12 27 8 23 6 0.6 16 53
227 2020/8/13 40 11 26 7 0.7 24 80
228 2020/8/14 46 10 28 7 0.6 21 91
229 2020/8/15 75 15 34 7 0.6 28 129
230 2020/8/16 96 19 43 8 0.8 29 155
231 2020/8/17 91 21 45 8 0.7 23 149
232 2020/8/18 77 30 55 8 0.5 18 132
233 2020/8/19 77 26 49 8 0.6 25 132
234 2020/8/20 130 轻度污染 21 41 8 0.8 30 193
235 2020/8/21 88 27 45 8 0.9 28 145
236 2020/8/22 87 31 53 7 0.8 22 144
237 2020/8/23 112 轻度污染 35 59 8 0.6 17 173
238 2020/8/24 91 33 58 10 0.8 28 149
239 2020/8/25 64 24 43 9 0.6 26 116
240 2020/8/26 72 26 41 8 0.7 20 126
241 2020/8/27 75 15 29 8 0.6 21 129
242 2020/8/28 54 26 53 12 0.9 39 104
243 2020/8/29 82 28 53 11 1.0 35 138
244 2020/8/30 100 24 40 9 0.8 32 160
245 2020/8/31 55 23 43 10 0.9 44 87
246 2020/9/1 49 20 37 10 0.9 39 78
247 2020/9/2 50 21 35 8 0.7 26 99
248 2020/9/3 89 24 49 11 0.7 45 146
249 2020/9/4 85 24 56 8 0.7 42 141
250 2020/9/5 104 轻度污染 31 62 14 0.8 42 164
251 2020/9/6 116 轻度污染 26 54 10 0.6 38 177
252 2020/9/7 114 轻度污染 34 65 11 0.8 58 175
253 2020/9/8 101 轻度污染 38 81 12 0.9 58 161
254 2020/9/9 86 46 82 13 0.9 65 143
255 2020/9/10 69 50 73 10 1.0 52 84
256 2020/9/11 75 24 43 8 0.9 31 130
257 2020/9/12 72 26 46 12 0.9 41 126
258 2020/9/13 67 29 48 9 0.8 30 120
259 2020/9/14 89 33 53 9 0.8 29 146
260 2020/9/15 38 16 24 7 0.8 30 64
261 2020/9/16 52 19 27 8 0.8 36 102
262 2020/9/17 49 15 22 7 0.7 28 98
263 2020/9/18 43 14 20 7 0.5 20 86
264 2020/9/19 70 21 36 9 0.7 27 124
265 2020/9/20 90 26 44 9 0.7 28 148
266 2020/9/21 50 19 37 9 0.6 29 100
267 2020/9/22 55 31 36 8 0.7 29 105
268 2020/9/23 46 17 33 7 0.7 33 92
269 2020/9/24 60 27 51 10 0.7 48 106
270 2020/9/25 62 21 47 9 0.7 43 114
271 2020/9/26 74 29 53 9 0.7 37 128
272 2020/9/27 60 18 41 9 0.6 25 112

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,357 @@
{
"cells": [
{
"cell_type": "code",
"id": "initial_id",
"metadata": {
"collapsed": true,
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.502127Z",
"start_time": "2025-05-07T06:54:44.496736Z"
}
},
"source": "import pandas as pd",
"outputs": [],
"execution_count": 19
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.557639Z",
"start_time": "2025-05-07T06:54:44.523063Z"
}
},
"cell_type": "code",
"source": [
"# 读取 Excel 文件中的商品销售数据\n",
"file_path = 'data/商品销售数据.csv'\n",
"try:\n",
" sales_data = pd.read_csv(file_path, encoding='gbk')\n",
" print(\"数据读取成功,数据基本信息:\")\n",
" sales_data.info()\n",
" print(\"数据前几行信息:\")\n",
" print(sales_data.head().to_csv(sep='\\t', na_rep='nan'))\n",
"except FileNotFoundError:\n",
" print(\n",
" f\"未找到文件 {file_path},请检查文件路径是否正确。\")"
],
"id": "e97cde3fb9ef1375",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"数据读取成功,数据基本信息:\n",
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 8978 entries, 0 to 8977\n",
"Data columns (total 11 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 订单号 8978 non-null object \n",
" 1 设备ID 8978 non-null object \n",
" 2 应付金额 8978 non-null float64\n",
" 3 实际金额 8978 non-null float64\n",
" 4 商品 8978 non-null object \n",
" 5 支付时间 8978 non-null object \n",
" 6 地点 8978 non-null object \n",
" 7 状态 8978 non-null object \n",
" 8 提现 8978 non-null object \n",
" 9 大类 8978 non-null object \n",
" 10 二级类 8978 non-null object \n",
"dtypes: float64(2), object(9)\n",
"memory usage: 771.7+ KB\n",
"数据前几行信息:\n",
"\t订单号\t设备ID\t应付金额\t实际金额\t商品\t支付时间\t地点\t状态\t提现\t大类\t二级类\n",
"0\tDD201708167493190200943961687\tE43A6E078A04228\t4.5\t4.5\t250ml燕塘原味酸奶\t2017/6/1 0:01\tC\t已出货未退款\t已提现\t饮料\t乳制品\n",
"1\tDD201708167493190206930007675\tE43A6E078A04134\t2.0\t2.0\t145ml旺仔牛奶盒装\t2017/6/1 0:02\tB\t已出货未退款\t已提现\t饮料\t乳制品\n",
"2\tDD201708167493190368633848103\tE43A6E078A04172\t1.5\t1.5\t劲仔小鱼卤香味\t2017/6/1 0:07\tA\t已出货未退款\t已提现\t非饮料\t肉干/豆制品/蛋\n",
"3\tDD201708167493466235023422173\tE43A6E078A04172\t4.5\t4.5\t80g香飘飘椰果奶茶麦香味\t2017/6/1 0:08\tA\t已出货未退款\t已提现\t饮料\t茶饮料\n",
"4\tDD20170521150353225D2CC0CD748\tE43A6E078A04172\t3.0\t3.0\t伊利纯牛奶\t2017/6/1 0:08\tA\t已出货未退款\t已提现\t饮料\t乳制品\n",
"\n"
]
}
],
"execution_count": 20
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.578832Z",
"start_time": "2025-05-07T06:54:44.573803Z"
}
},
"cell_type": "code",
"source": [
"# 按照二级类别分组并对实际金额列求和\n",
"category_sales = sales_data.groupby('二级类')['实际金额'].sum().reset_index()\n",
"print(\"各二级类别的销售额:\")\n",
"print(category_sales)"
],
"id": "eb320166a60c9ea2",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"各二级类别的销售额:\n",
" 二级类 实际金额\n",
"0 乳制品 5308.5\n",
"1 其他 3.2\n",
"2 功能饮料 3581.7\n",
"3 咖啡 515.0\n",
"4 坚果炒货 146.8\n",
"5 方便速食 3004.5\n",
"6 果冻/龟苓膏 17.0\n",
"7 果蔬饮料 891.0\n",
"8 植物蛋白 1497.0\n",
"9 水 1795.1\n",
"10 海味零食 371.8\n",
"11 碳酸饮料 2088.4\n",
"12 糖果/巧克力 240.7\n",
"13 纸巾 84.6\n",
"14 肉干/豆制品/蛋 4378.7\n",
"15 膨化食品 2799.7\n",
"16 茶饮料 4905.0\n",
"17 蜜饯/果干 987.9\n",
"18 饼干糕点 3837.5\n"
]
}
],
"execution_count": 21
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.601992Z",
"start_time": "2025-05-07T06:54:44.598723Z"
}
},
"cell_type": "code",
"source": [
"# 对求和结果进行降序排序\n",
"category_sales = category_sales.sort_values(by='实际金额', ascending=False)\n",
"print(\"按销售额降序排序后的二级类别销售额:\")\n",
"print(category_sales)"
],
"id": "50235c92d3bd17c",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"按销售额降序排序后的二级类别销售额:\n",
" 二级类 实际金额\n",
"0 乳制品 5308.5\n",
"16 茶饮料 4905.0\n",
"14 肉干/豆制品/蛋 4378.7\n",
"18 饼干糕点 3837.5\n",
"2 功能饮料 3581.7\n",
"5 方便速食 3004.5\n",
"15 膨化食品 2799.7\n",
"11 碳酸饮料 2088.4\n",
"9 水 1795.1\n",
"8 植物蛋白 1497.0\n",
"17 蜜饯/果干 987.9\n",
"7 果蔬饮料 891.0\n",
"3 咖啡 515.0\n",
"10 海味零食 371.8\n",
"12 糖果/巧克力 240.7\n",
"4 坚果炒货 146.8\n",
"13 纸巾 84.6\n",
"6 果冻/龟苓膏 17.0\n",
"1 其他 3.2\n"
]
}
],
"execution_count": 22
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.616005Z",
"start_time": "2025-05-07T06:54:44.612951Z"
}
},
"cell_type": "code",
"source": [
"# 取排名前 5 的商品类别\n",
"top_5_category_sales = category_sales.head(5)\n",
"print(\"排名前 5 的商品类别销售额:\")\n",
"print(top_5_category_sales)"
],
"id": "be36c041c8eccfe1",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"排名前 5 的商品类别销售额:\n",
" 二级类 实际金额\n",
"0 乳制品 5308.5\n",
"16 茶饮料 4905.0\n",
"14 肉干/豆制品/蛋 4378.7\n",
"18 饼干糕点 3837.5\n",
"2 功能饮料 3581.7\n"
]
}
],
"execution_count": 23
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.641057Z",
"start_time": "2025-05-07T06:54:44.636193Z"
}
},
"cell_type": "code",
"source": [
"# 统计商品销售数量\n",
"product_sales_quantity = sales_data.groupby('商品')['商品'].count().reset_index(name='销售数量')\n",
"print(\"各商品的销售数量:\")\n",
"print(product_sales_quantity)"
],
"id": "fc85a9c33d529237",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"各商品的销售数量:\n",
" 商品 销售数量\n",
"0 100g*5瓶益力多 26\n",
"1 100g卫龙点心面黑椒牛排味 3\n",
"2 100g果王咸柑桔罐装 13\n",
"3 103g康师傅红烧牛肉面 8\n",
"4 107g出前一丁桶面酱香牛肉王 6\n",
".. ... ...\n",
"249 顺宝九制梅 6\n",
"250 香脆肠 22\n",
"251 香豆干 63\n",
"252 鸡爪 7\n",
"253 鸭翅 112\n",
"\n",
"[254 rows x 2 columns]\n"
]
}
],
"execution_count": 24
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.656687Z",
"start_time": "2025-05-07T06:54:44.651375Z"
}
},
"cell_type": "code",
"source": [
"from pyecharts import options as opts\n",
"from pyecharts.charts import Funnel\n",
"\n",
"# 提取排名前 5 的商品类别和对应的销售额\n",
"categories = top_5_category_sales['二级类'].tolist()\n",
"sales = top_5_category_sales[\n",
" '实际金额'].tolist()\n",
"# 创建漏斗图对象\n",
"funnel = (Funnel().add(\"商品类别销售额\",\n",
" [list(z) for z in zip(categories, sales)],\n",
" label_opts=opts.LabelOpts(position=\"inside\")).set_global_opts(\n",
" title_opts=opts.TitleOpts(title=\"排名前 5 的商品类别销售额漏斗图\"),\n",
" toolbox_opts=opts.ToolboxOpts(is_show=True)))\n",
"# 渲染图表\n",
"funnel.render(\"./top_5_category_sales_funnel.html\")"
],
"id": "a4aa162f159b79ac",
"outputs": [
{
"data": {
"text/plain": [
"'/Volumes/Data/04CodeData/gcc-project-py-25-2/商务大数据分析/20250507/top_5_category_sales_funnel.html'"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 25
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.685357Z",
"start_time": "2025-05-07T06:54:44.675073Z"
}
},
"cell_type": "code",
"source": [
"from pyecharts import options as opts\n",
"from pyecharts.charts import WordCloud\n",
"\n",
"# 提取商品名称和对应的销售数量\n",
"products = product_sales_quantity['商品'].tolist()\n",
"quantities = product_sales_quantity[\n",
" '销售数量'].tolist()\n",
"# 组合商品名称和销售数量\n",
"data = [list(z) for z in zip(products, quantities)]\n",
"# 创建词云图对象\n",
"wordcloud = (WordCloud().add(\"\",\n",
" data,\n",
" word_size_range=[20, 100]).set_global_opts(\n",
" title_opts=opts.TitleOpts(title=\"商品销售数量词云图\"),\n",
" toolbox_opts=opts.ToolboxOpts(is_show=True)))\n",
"# 渲染词云图\n",
"wordcloud.render(\"./product_sales_wordcloud.html\")"
],
"id": "95347caf8be5b12a",
"outputs": [
{
"data": {
"text/plain": [
"'/Volumes/Data/04CodeData/gcc-project-py-25-2/商务大数据分析/20250507/product_sales_wordcloud.html'"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 26
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-05-07T06:54:44.697529Z",
"start_time": "2025-05-07T06:54:44.695983Z"
}
},
"cell_type": "code",
"source": "",
"id": "5b4334b07f625e34",
"outputs": [],
"execution_count": null
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

File diff suppressed because one or more lines are too long