python-pandas-操作全集(持续更新)

2024-04-16 06:52

本文主要是介绍python-pandas-操作全集(持续更新),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一、基础认识

1. 读取数据.得到基本信息

  • 读取语法 pandas.read_csv(“filename”)
  • 结构,type()
  • 每一列数据类型food_info.dtypes
  • 帮助文档help(pandas.read_csv)
import pandass = "../../data/food_info.csv"
food_info = pandas.read_csv(s)  # 相对路径即可
print(type(food_info))  # 整体的结构类型
print(food_info.dtypes)  # 每一个属性的数据类型
<class 'pandas.core.frame.DataFrame'>
NDB_No               int64
Shrt_Desc           object
Water_(g)          float64
Energ_Kcal           int64
Protein_(g)        float64
Lipid_Tot_(g)      float64
Ash_(g)            float64
Carbohydrt_(g)     float64
Fiber_TD_(g)       float64
Sugar_Tot_(g)      float64
Calcium_(mg)       float64
Iron_(mg)          float64
Magnesium_(mg)     float64
Phosphorus_(mg)    float64
Potassium_(mg)     float64
Sodium_(mg)        float64
Zinc_(mg)          float64
Copper_(mg)        float64
Manganese_(mg)     float64
Selenium_(mcg)     float64
Vit_C_(mg)         float64
Thiamin_(mg)       float64
Riboflavin_(mg)    float64
Niacin_(mg)        float64
Vit_B6_(mg)        float64
Vit_B12_(mcg)      float64
Vit_A_IU           float64
Vit_A_RAE          float64
Vit_E_(mg)         float64
Vit_D_mcg          float64
Vit_D_IU           float64
Vit_K_(mcg)        float64
FA_Sat_(g)         float64
FA_Mono_(g)        float64
FA_Poly_(g)        float64
Cholestrl_(mg)     float64
dtype: object
food_info
NDB_NoShrt_DescWater_(g)Energ_KcalProtein_(g)Lipid_Tot_(g)Ash_(g)Carbohydrt_(g)Fiber_TD_(g)Sugar_Tot_(g)...Vit_A_IUVit_A_RAEVit_E_(mg)Vit_D_mcgVit_D_IUVit_K_(mcg)FA_Sat_(g)FA_Mono_(g)FA_Poly_(g)Cholestrl_(mg)
01001BUTTER WITH SALT15.877170.8581.112.110.060.00.06...2499.0684.02.321.560.07.051.36821.0213.043215.0
11002BUTTER WHIPPED WITH SALT15.877170.8581.112.110.060.00.06...2499.0684.02.321.560.07.050.48923.4263.012219.0
21003BUTTER OIL ANHYDROUS0.248760.2899.480.000.000.00.00...3069.0840.02.801.873.08.661.92428.7323.694256.0
31004CHEESE BLUE42.4135321.4028.745.112.340.00.50...721.0198.00.250.521.02.418.6697.7780.80075.0
41005CHEESE BRICK41.1137123.2429.683.182.790.00.51...1080.0292.00.260.522.02.518.7648.5980.78494.0
..................................................................
861383110MACKEREL SALTED43.0030518.5025.1013.400.000.00.00...157.047.02.3825.21006.07.87.1488.3206.21095.0
861490240SCALLOP (BAY&SEA) CKD STMD70.2511120.540.842.975.410.00.00...5.02.00.000.02.00.00.2180.0820.22241.0
861590480SYRUP CANE26.002690.000.000.8673.140.073.20...0.00.00.000.00.00.00.0000.0000.0000.0
861690560SNAIL RAW79.209016.101.401.302.000.00.00...100.030.05.000.00.00.10.3610.2590.25250.0
861793600TURTLE GREEN RAW78.508919.800.501.200.000.00.00...100.030.00.500.00.00.10.1270.0880.17050.0

8618 rows × 36 columns

food_info["Water_(g)"]
0       15.87
1       15.87
2        0.24
3       42.41
4       41.11...  
8613    43.00
8614    70.25
8615    26.00
8616    79.20
8617    78.50
Name: Water_(g), Length: 8618, dtype: float64
data = food_info["Water_(g)"]
print(type(data))
print(data)
<class 'pandas.core.series.Series'>
0       15.87
1       15.87
2        0.24
3       42.41
4       41.11...  
8613    43.00
8614    70.25
8615    26.00
8616    79.20
8617    78.50
Name: Water_(g), Length: 8618, dtype: float64
for item in data:print(item)
15.87
15.87
0.24
42.41
41.11
48.42
51.8
39.28
37.1
37.65
38.2
79.79
79.64
81.01
81.24
82.48
54.44
41.56
55.22
37.92
13.44
41.46
33.19
48.42
41.01
50.01
48.38
53.78
45.54
41.77
63.11
22.65
29.16
45.45
40.95
71.7
74.41
30.91
39.38
37.12
42.86
39.61
39.08
42.31
43.12
44.0
43.67
47.65
80.57
73.75
63.5
57.71
61.33
80.14
74.46
82.54
74.79
87.67
87.73
65.47
77.27
77.27
2.21
1.47
65.74
60.37
50.21
71.15
88.18
88.13
87.69
89.21
88.86
87.71
89.92
89.81
88.74
90.84
90.38
89.36
90.13
88.2
2.47
3.16
3.96
4.9
2.97
27.16
74.04
79.4
82.3
82.17
82.34
82.45
87.03
87.5
83.39
80.7
72.2
74.45
93.42
3.51
93.12
3.19
87.9
85.07
85.23
79.0
75.3
74.48
74.1
76.15
87.57
52.31
56.77
51.23
69.47
74.62
76.13
75.85
76.4
3.67
1.87
14.62
8.54
2.73
70.83
70.43
74.35
72.5
3.86
17.94
25.0
90.84
87.71
74.04
3.16
3.96
29.01
45.52
60.75
50.87
47.36
66.86
38.06
42.16
39.13
63.1
38.98
75.2
88.97
5.8
89.21
89.92
71.0
78.1
80.6
48.2
87.43
8.6
71.87
71.57
51.5
51.5
58.0
45.8
51.3
76.2
77.7
86.0
66.44
82.17
74.1
50.6
50.06
1.52
50.6
48.2
2.78
88.13
2.47
74.04
51.8
75.3
74.48
75.4
74.1
79.0
87.43
71.57
15.0
12.0
28.71
87.0
42.17
51.42
48.7
87.91
79.0
73.5
59.8
46.3
48.9
48.7
37.43
52.63
48.13
65.52
61.43
79.74
42.48
43.79
39.61
44.0
67.83
85.1
6.53
61.82
44.29
68.92
35.48
57.0
63.6
38.0
36.15
44.81
82.03
76.6
78.5
78.63
79.62
8.46
9.54
10.35
5.44
9.87
8.28
6.04
7.2
10.75
10.58
9.87
7.3
8.86
8.06
8.8
7.7
7.3
8.81
8.84
6.45
9.94
8.17
7.64
5.27
6.23
5.39
9.93
11.24
5.89
12.46
8.05
11.42
5.95
9.31
8.46
9.31
11.9
7.96
9.0
7.74
7.79
12.85
92.06
85.95
83.72
0.2
93.81
65.11
52.58
64.46
85.58
94.78
83.85
85.08
67.77
78.65
85.55
11.3
94.47
76.45
5.7
0.2
5.7
10.75
12.89
82.44
82.44
82.37
78.4
80.5
80.5
81.06
79.6
77.5
76.0
68.3
80.32
80.32
69.8
19.09
69.5
88.9
88.6
82.3
86.34
86.7
76.5
86.84
81.7
81.9
84.17
81.6
86.9
84.94
84.94
84.3
85.75
87.47
87.0
88.6
88.6
85.64
87.25
89.1
83.3
86.9
87.2
86.2
87.3
90.3
88.7
88.22
86.64
88.82
88.5
85.25
86.5
91.85
92.5
92.6
86.2
90.1
92.3
91.0
92.66
92.66
84.8
84.1
86.8
87.3
87.5
88.6
89.5
83.1
83.6
81.4
87.52
84.6
89.6
82.1
84.0
83.65
83.65
88.4
87.8
80.0
79.2
80.3
80.1
74.3
80.0
85.6
87.7
86.9
85.63
85.6
83.14
89.5
89.1
83.8
84.0
84.0
81.1
81.7
88.5
87.8
82.5
87.4
80.6
79.0
83.1
82.8
88.0
87.1
89.0
88.3
87.3
81.3
88.5
88.9
87.6
87.8
86.9
87.3
81.9
87.9
6.8
1.7
6.7
4.5
80.0
79.6
5.9
4.7
82.2
81.8
5.8
6.7
81.0
88.8
88.7
87.2
85.9
5.4
5.7
2.0
80.4
5.3
4.7
5.9
5.6
4.0
6.4
4.5
79.5
80.32
79.8
81.5
81.0
79.8
81.8
81.2
82.9
83.0
77.6
83.4
82.2
83.2
79.9
79.31
88.1
86.5
89.5
88.3
87.76
88.7
90.6
81.5
89.4
90.0
89.8
87.8
85.3
87.3
85.6
86.3
85.4
86.92
92.5
6.0
83.7
81.5
82.19
74.5
79.21
81.81
74.5
81.81
74.5
81.96
74.4
74.2
74.4
81.81
87.5
75.8
2.5
88.0
3.3
88.0
3.3
3.3
75.34
87.38
2.5
88.35
75.7
3.3
75.32
3.0
82.86
2.0
87.5
88.35
75.47
88.35
3.0
2.2
75.47
88.35
2.25
3.4
85.07
85.61
87.54
75.81
2.5
75.7
87.38
87.32
2.5
87.79
76.16
3.5
2.25
75.47
87.79
76.16
88.35
2.25
87.5
80.47
3.0
86.4
2.5
88.35
2.2
80.47
86.6
74.2
2.5
87.5
75.4
2.5
3.0
86.41
82.62
87.32
88.1
76.0
2.0
88.0
76.0
2.0
87.0
3.0
87.0
2.25
87.0
75.88
2.2
87.79
2.25
76.16
75.81
87.54
2.5
86.0
79.16
1.5
88.97
87.5
87.5
88.4
14.0
80.21
74.2
3.0
87.5
2.6
87.78
86.67
87.78
87.78
87.23
87.78
87.68
87.86
87.5
87.86
87.21
87.78
87.87
72.23
76.68
4.58
2.42
2.6
3.0
0.0
0.0
55.4
81.8
78.7
38.53
39.2
46.51
61.22
54.28
80.11
65.0
60.73
21.65
15.3
62.7
79.6
34.6
40.8
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
15.7
63.4
36.56
59.55
24.2
47.4
36.56
54.28
56.4
84.68
16.7
24.2
65.04
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
39.71
0.0
0.2
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.2
0.2
0.2
0.0
0.0
0.0
0.0
17.07
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
56.0
42.1
43.2
0.0
0.0
16.52
17.07
36.95
37.58
38.68
0.0
16.52
17.07
37.58
91.0
28.0
59.0
16.52
26.23
49.66
90.69
78.8
78.8
66.14
85.95
68.33
45.85
62.04
66.13
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
28.0
0.05
0.05
0.04
0.08
0.04
0.07
0.04
0.08
0.0
15.8
0.0
0.0
17.17
0.0
0.0
33.95
59.89
80.83
87.91
27.86
0.0
0.11
29.52
16.06
0.0
57.19
53.73
71.0
52.44
59.55
16.52
17.07
36.95
37.58
38.68
16.52
37.58
0.0
0.0
0.0
0.0
0.0
32.64
38.85
64.1
56.17
0.16
57.58
67.78
66.34
49.29
51.88
60.11
64.04
65.99
49.39
52.41
59.45
63.93
75.46
57.53
63.79
66.81
54.22
36.11
28.54
40.29
53.27
74.87
47.89
67.72
79.33
67.93
73.56
64.85
76.46
66.81
68.6
50.23
54.66
60.51
65.13
65.42
48.82
50.82
58.63
62.99
74.86
60.14
64.76
68.02
75.99
55.7
63.06
65.83
28.91
58.1
44.51
43.96
53.52
60.93
75.31
47.87
58.75
64.33
69.46
51.64
56.59
62.44
66.21
73.9
60.21
65.26
68.27
72.46
52.77
56.73
66.39
65.12
76.78
62.24
69.93
67.58
67.3
52.08
55.28
66.74
64.01
76.41
60.61
67.69
66.44
59.99
46.92
47.49
61.73
71.17
58.71
67.05
66.47
51.5
54.14
61.96
63.11
76.22
59.31
67.0
65.59
69.19
46.21
48.62
59.4
62.18
74.95
59.83
62.78
67.01
65.98
62.35
70.78
62.1
74.94
67.41
74.73
66.32
74.3
67.85
75.48
67.05
62.5
64.24
61.84
53.07
72.54
56.35
69.8
64.0
73.24
57.79
71.94
55.09
63.66
59.25
63.24
58.7
74.12
66.54
48.5
51.84
73.77
64.22
71.78
66.52
75.51
49.66
51.95
68.3
57.23
71.78
68.9
74.44
67.77
72.77
72.4
73.4
69.65
70.03
71.67
56.6
72.8
72.82
72.69
63.52
75.37
66.7
48.38
34.91
76.03
66.65
77.47
69.22
74.47
67.15
75.54
63.99
75.92
69.47
70.68
64.79
71.1
61.66
74.89
67.88
76.01
65.23
57.94
70.05
63.22
72.69
61.19
66.49
59.49
65.76
76.01
65.23
74.89
67.88
74.89
67.88
35.53
68.65
37.04
66.07
71.7
85.07
49.7
70.91
70.6
70.4
67.84
49.4
62.66
69.29
62.95
69.09
72.36
62.07
68.18
58.68
75.84
71.9
64.9
61.79
53.89
75.59
63.25
68.25
60.9
64.6
64.11
57.25
50.04
50.82
51.34
73.24
64.92
64.35
65.8
67.29
73.31
72.55
62.87
61.24
68.23
63.05
43.76
63.89
61.13
56.44
63.49
59.78
60.34
55.34
70.6
70.0
47.81
59.41
65.19
61.42
61.41
57.23
72.93
73.5
72.87
65.83
74.62
66.43
75.4
73.79
61.97
74.73
64.31
74.87
72.57
67.37
71.07
67.12
75.93
75.97
69.95
74.16
66.53
75.59
74.58
66.88
75.62
67.55
75.68
74.5
76.12
68.51
75.35
67.95
65.22
74.66
65.76
68.4
72.63
61.05
62.42
69.74
56.66
58.25
69.94
66.87
42.09
44.91
39.45
66.33
61.93
77.71
69.5
70.18
68.62
77.16
67.86
46.96
50.37
40.73
67.06
73.79
65.97
63.97
68.63
62.6
62.96
75.86
66.85
76.42
70.18
50.0
36.92
70.55
62.66
72.09
67.09
76.25
68.81
71.26
65.05
75.95
69.99
74.66
67.53
75.05
64.04
50.08
39.42
75.67
75.62
70.18
75.86
70.18
76.42
66.98
65.14
75.86
66.85
75.86
72.76
66.85
76.42
70.18
70.98
64.59
66.78
57.34
73.37
62.57
74.89
67.88
76.01
65.23
71.28
65.12
66.93
62.1
65.32
66.14
68.05
66.54
84.05
75.33
88.0
70.17
67.7
78.63
97.55
84.42
84.96
81.69
83.82
91.96
83.1
84.12
82.75
88.02
89.88
88.2
86.78
83.15
91.68
85.52
70.86
86.04
84.3
88.8
81.49
94.76
91.5
96.89
85.75
81.69
86.72
82.95
86.4
84.9
84.7
84.6
86.35
81.0
86.0
89.88
68.54
80.95
65.67
80.62
82.0
84.4
83.78
84.85
95.9
86.4
74.08
88.32
77.13
86.37
89.53
84.91
83.34
83.69
83.27
3.27
3.3
2.27
2.5
83.0
83.2
94.9
3.79
93.5
2.9
67.69
94.5
2.74
87.48
70.2
5.0
85.34
3.85
89.0
3.34
4.36
4.43
88.6
4.67
4.0
4.94
59.66
87.1
85.2
80.6
85.5
80.4
54.71
53.71
86.71
75.32
80.79
89.18
80.66
74.89
69.1
89.98
95.17
95.89
92.15
96.6
44.23
80.0
87.3
89.7
71.07
90.13
87.26
97.32
69.7
79.91
82.4
82.8
97.81
87.3
86.0
87.9
86.6
86.46
82.44
87.8
80.6
84.2
86.6
84.83
82.79
85.9
87.09
82.5
78.8
79.7
83.5
84.0
80.6
82.5
82.0
84.0
85.49
76.6
84.5
83.0
83.0
83.5
83.7
83.5
83.5
80.2
85.3
84.7
87.04
88.9
87.8
84.5
88.94
77.93
84.2
89.0
85.3
86.67
87.11
84.02
78.56
54.22
83.15
89.1
83.9
89.73
90.31
86.82
91.1
86.8
78.3
91.7
87.4
91.9
90.6
90.0
88.5
89.8
89.6
91.2
89.5
90.5
88.6
89.6
84.8
84.4
82.45
84.3
84.76
86.2
82.2
82.0
85.8
79.1
85.7
79.5
74.5
80.3
91.0
87.2
85.7
81.51
85.98
66.8
85.9
86.4
82.8
79.7
83.3
81.6
78.7
82.0
80.79
75.4
66.0
83.8
82.3
87.7
85.3
84.3
85.59
83.22
83.8
88.9
83.9
78.7
85.6
88.8
91.8
87.62
87.0
85.35
87.59
83.03
87.7
92.16
92.27
88.12
91.78
95.95
81.6
82.6
90.62
93.84
88.6
93.82
93.87
85.68
92.26
87.9
90.89
83.52
96.24
83.8
88.06
78.7
85.2
88.0
91.33
87.3
92.4
92.46
92.08
90.5
88.2
94.86
84.55
81.77
92.49
80.0
92.38
87.1
81.0
86.99
86.5
88.52
92.99
92.89
92.41
98.2
91.8
91.59
98.69
98.69
98.28
97.43
88.8
90.94
89.4
94.75
95.8
92.4
89.88
92.0
84.7
87.4
90.6
89.8
94.16
88.7
87.0
89.2
86.4
88.3
86.53
88.0
92.6
88.7
90.0
87.17
91.38
88.9
6.52
82.7
91.1
94.0
93.5
88.8
90.2
91.0
86.0
91.0
94.0
90.3
88.6
88.6
87.1
90.7
86.6
89.3
89.9
85.3
88.7
98.2
97.6
89.8
62.08
85.3
85.5
88.3
84.3
86.4
91.0
88.6
3.78
82.1
84.2
85.3
84.1
81.0
70.9
84.6
86.8
81.4
65.4
86.0
89.5
88.6
88.22
70.5
87.39
80.0
85.8
82.5
5.51
4.65
5.24
2.05
94.1
93.9
96.0
91.38
84.55
93.82
91.35
90.3
5.8
96.0
78.54
68.0
83.4
87.39
87.5
83.3
79.9
2.3
6.56
6.5
98.1
89.97
88.19
86.5
86.09
87.09
83.2
81.8
79.1
84.8
80.9
97.8
90.2
88.2
88.3
64.82
56.71
61.46
60.97
47.3
54.47
55.31
51.87
60.6
64.55
51.45
50.6
51.3
52.5
72.41
57.41
31.85
69.1
58.1
53.94
55.96
62.5
62.99
60.77
65.3
75.14
67.27
57.35
62.6
60.3
59.13
73.84
51.08
54.58
55.3
65.77
53.6
52.1
52.5
73.72
65.87
51.5
71.1
52.3
58.2
71.73
65.64
37.04
53.9
67.4
29.6
60.29
53.15
68.2
54.9
60.2
56.58
49.89
44.55
59.59
66.17
60.0
45.19
68.8
36.18
41.19
60.28
56.49
53.97
57.4
53.91
45.18
74.07
71.92
75.83
70.15
64.9
64.78
47.13
58.62
66.77
53.7
54.15
65.0
78.0
64.75
54.7
50.5
49.6
70.4
75.8
60.5
65.25
74.45
74.6
72.7
75.8
79.2
67.5
58.6
58.9
57.5
55.8
49.5
64.5
60.6
62.9
39.1
38.25
59.2
55.5
56.3
54.9
55.5
53.2
52.5
53.3
77.5
53.35
53.22
53.15
78.0
66.8
52.9
78.8
66.7
55.0
72.9
73.7
71.5
63.9
66.9
61.83
67.55
74.75
74.8
72.0
76.5
74.8
74.3
74.0
73.1
50.7
71.9
71.4
69.1
59.06
69.1
68.2
69.4
68.2
69.8
67.0
52.6
65.72
47.84
56.67
76.3
58.66
71.5
55.5
64.92
51.7
65.72
53.51
53.53
61.7
33.74
71.6
55.2
56.58
56.11
36.2
63.12
55.31
21.6
56.65
70.28
65.89
74.3
34.6
68.5
60.5
68.5
58.2
56.71
76.73
76.71
62.0
72.98
64.87
45.37
69.94
59.85
57.63
40.5
51.8
73.5
72.0
53.5
57.82
56.31
62.47
55.25
39.64
43.75
70.42
51.12
50.68
65.06
56.42
50.85
74.47
57.58
55.16
53.9
64.21
55.88
45.96
49.38
49.98
52.82
55.93
53.67
34.46
2.12
1.2
2.5
3.0
2.5
2.5
2.5
5.13
2.81
2.5
2.3
2.5
2.49
3.76
3.0
3.62
2.5
3.4
2.5
4.8
2.5
3.0
2.2
5.4
3.5
3.3
2.86
1.5
3.35
2.79
4.3
4.15
2.19
2.2
3.5
2.0
10.4
8.6
2.59
5.06
3.91
3.0
3.0
4.18
2.9
1.4
3.68
2.67
2.0
3.0
2.5
0.89
5.6
3.4
2.5
2.6
10.92
82.93
7.2
81.22
6.71
7.37
10.5
87.5
10.9
87.61
11.08
86.55
10.4
84.4
86.55
9.8
10.84
83.61
8.92
84.03
6.62
6.92
76.74
6.28
8.44
78.44
1.7
6.5
85.4
9.9
83.6
3.69
6.1
3.0
3.0
3.0
11.37
10.0
82.93
84.36
84.36
87.5
87.14
10.5
86.55
6.69
83.61
85.4
83.6
3.5
6.0
4.7
2.6
10.35
2.9
3.42
4.5
4.3
2.75
2.75
2.75
4.0
3.39
3.4
6.59
6.56
8.35
8.9
89.07
2.04
88.98
2.35
3.18
4.69
8.36
83.58
83.44
3.0
4.0
6.2
2.3
2.2
1.89
1.89
1.8
3.24
1.89
2.09
5.59
3.8
8.69
3.5
3.0
2.5
3.0
10.0
10.0
3.0
4.8
1.26
2.5
3.4
1.5
2.5
4.0
2.75
2.5
2.5
11.72
4.2
4.78
nan
2.5
5.0
3.0
4.4
3.5
2.5
4.0
3.0
2.0
3.0
9.37
3.48
7.37
6.87
6.77
4.43
8.45
7.06
6.8
6.82
9.38
9.8
3.0
5.05
5.0
3.1
3.0
3.0
1.88
2.76
3.59
8.5
1.1
9.69
5.9
1.9
2.2
2.4
1.5
4.4
1.2
2.53
3.59
3.31
4.07
3.78
3.85
8.69
89.51
89.15
2.29
3.0
3.3
3.0
5.0
5.1
3.0
6.2
7.5
4.3
2.5
2.23
3.0
3.65
5.9
6.98
3.0
8.39
8.6
11.56
86.2
87.11
11.41
86.4
86.51
2.5
7.47
2.3
2.2
3.0
2.0
3.5
2.5
3.5
2.5
5.2
2.2
2.2
2.19
2.31
2.75
6.0
2.7
5.19
3.0
3.5
3.0
2.5
3.5
2.5
3.0
3.5
2.5
2.5
5.0
5.0
6.3
2.48
3.21
4.3
2.5
5.3
2.75
3.0
2.59
1.8
2.6
8.45
8.8
7.39
7.94
2.37
3.0
3.0
3.0
3.0
3.5
2.2
3.5
3.6
3.0
2.9
3.4
3.59
3.5
2.65
2.5
2.29
2.9
8.5
2.8
2.2
1.79
2.79
2.2
2.7
2.2
1.7
4.4
3.0
3.1
4.03
6.3
2.2
2.4
6.4
2.09
2.0
1.89
2.5
2.75
9.02
9.04
7.52
7.47
7.8
7.57
8.1
6.59
9.09
4.8
5.67
8.5
2.75
3.5
5.69
3.0
9.19
8.5
7.59
3.0
2.29
3.0
6.3
91.41
94.3
85.56
86.67
85.47
84.63
82.36
82.28
3.0
79.36
31.76
84.13
78.76
86.85
87.16
88.24
57.0
87.9
88.22
81.98
86.35
92.36
93.43
86.62
86.3
82.56
77.56
77.66
74.33
7.5
63.6
30.89
75.56
68.45
73.3
84.87
73.23
72.33
78.81
74.91
3.0
88.15
90.9
16.6
75.06
82.21
84.21
76.78
85.8
86.59
77.4
76.26
85.9
70.65
91.38
84.17
79.39
86.13
89.93
79.62
75.66
69.73
87.2
82.25
87.05
84.95
81.56
77.61
72.66
75.53
78.94
87.13
16.0
60.65
53.2
81.96
83.95
19.21
71.5
20.53
79.8
79.11
85.21
81.26
76.33
71.39
30.05
69.8
90.76
87.44
87.7
84.37
80.4
76.43
91.5
86.15
84.24
80.26
76.64
87.87
80.1
90.89
88.06
89.31
91.56
90.48
89.58
90.76
89.85
89.67
83.59
90.1
87.38
62.0
89.3
90.0
84.29
84.51
81.3
80.54
88.84
79.53
84.51
85.4
80.8
80.66
89.56
73.46
83.13
77.86
19.7
83.07
80.85
88.98
92.31
92.46
92.39
81.6
88.26
90.79
92.52
14.8
81.76
22.3
84.61
82.75
17.6
86.73
86.2
83.46
80.94
90.15
91.85
89.82
90.26
87.68
87.59
92.3
79.99
84.34
75.28
86.75
86.34
85.97
87.14
82.3
88.3
87.72
87.22
87.22
87.22
60.57
60.57
90.07
72.5
88.64
85.17
89.51
83.06
88.9
87.0
88.06
43.33
85.02
72.93
85.62
84.21
88.87
93.13
87.49
88.2
84.72
79.28
73.19
79.2
7.5
62.04
31.8
78.1
71.38
74.73
85.64
83.96
91.81
86.47
87.3
84.46
80.35
74.28
26.69
64.44
61.2
84.01
80.32
23.01
64.4
86.0
90.82
83.51
85.73
78.99
77.71
77.1
86.37
53.1
86.6
90.81
65.28
67.3
87.23
88.35
84.02
83.0
76.06
73.0
77.93
87.55
70.67
4.0
67.99
30.92
69.73
65.08
81.24
89.1
83.8
14.97
15.43
16.57
78.04
85.75
75.33
72.75
93.61
93.51
67.79
86.58
93.0
78.0
64.87
81.16
90.95
75.35
89.97
78.05
73.18
73.23
31.4
76.78
91.45
57.27
83.28
88.25
80.4
75.72
70.63
83.51
77.56
88.31
77.61
80.62
80.35
76.06
89.51
88.24
88.22
79.58
84.87
90.0
85.64
84.01
86.37
57.0
87.9
84.14
84.24
83.18
83.31
75.28
21.32
64.99
30.0
16.7
79.9
71.4
87.24
85.66
84.6
85.02
86.58
84.72
83.51
86.63
84.97
83.43
86.26
83.16
85.95
87.05
86.44
83.22
36.08
49.04
74.85
80.64
93.05
88.97
87.24
85.33
85.81
85.46
85.76
84.16
87.22
83.46
85.1
87.06
81.7
84.51
85.64
88.0
86.0
86.0
87.92
85.75
28.28
49.83
73.17
65.99
7.69
36.74
24.76
26.26
62.47
55.04
72.9
60.66
68.64
61.92
74.78
65.75
67.69
60.37
74.88
65.28
66.92
58.27
57.87
57.51
72.23
61.4
60.72
61.02
67.64
57.32
61.45
58.74
72.84
60.32
65.03
62.24
69.7
58.04
62.27
60.26
73.62
61.79
65.01
63.65
67.83
56.85
61.66
57.76
72.4
61.56
65.14
61.44
70.29
58.88
60.58
59.34
73.98
62.16
64.61
61.74
76.0
69.45
70.38
62.44
62.92
63.76
72.93
65.14
65.11
65.6
64.02
54.8
72.63
60.64
68.34
60.03
52.04
75.51
63.59
60.27
69.18
54.95
57.25
57.47
74.31
58.0
60.07
60.94
59.75
40.42
62.53
72.38
78.36
75.88
76.11
67.87
61.25
72.65
64.99
76.21
68.08
22.19
80.06
68.7
4.09
71.06
64.32
79.52
80.0
56.87
67.18
60.3
78.43
66.7
73.5
61.13
65.9
56.9
44.24
47.41
26.93
72.31
61.7
75.0
67.67
64.54
73.52
69.45
60.93
55.93
63.46
54.4
72.24
59.71
68.26
65.78
65.82
65.07
65.15
11.0
31.06
28.89
54.73
63.86
59.13
56.18
62.85
46.05
46.7
62.17
61.14
58.01
58.39
57.11
64.81
66.92
65.75
71.12
66.52
62.62
65.11
58.53
59.42
63.47
54.82
66.15
58.15
53.37
56.34
57.33
71.98
62.25
56.95
60.86
60.61
68.22
53.9
48.38
72.84
56.16
58.72
73.16
65.78
65.98
62.82
74.3
66.41
66.75
64.07
74.97
61.06
52.75
61.09
69.11
62.3
70.14
73.28
69.13
59.43
72.23
60.3
71.8
57.08
72.42
64.46
74.25
71.9
74.44
73.53
69.17
71.35
72.95
64.49
62.52
12.52
20.38
23.65
70.72
0.25
70.92
77.03
69.97
68.58
70.21
71.2
72.11
73.05
67.9
66.98
65.87
69.47
69.53
72.06
72.58
73.95
69.23
71.1
71.71
72.85
76.53
76.75
74.32
75.54
73.97
70.8
70.5
70.29
72.46
35.47
35.65
68.02
65.33
72.68
70.62
67.16
65.04
63.86
72.96
71.07
61.56
67.5
72.85
69.88
69.21
69.49
67.23
63.43
65.48
71.32
71.72
64.6
60.03
67.21
71.14
72.11
64.38
62.94
63.36
70.93
68.53
71.62
63.82
67.68
69.56
67.46
69.79
63.67
65.23
62.57
69.97
66.09
48.11
38.32
73.07
76.91
59.2
74.85
63.06
73.53
68.65
60.71
76.1
72.64
70.36
56.13
65.19
68.72
75.18
74.37
67.26
68.7
74.57
66.99
75.88
64.67
73.62
41.67
51.35
61.03
43.85
51.97
60.08
68.57
57.58
72.94
64.76
65.0
59.98
59.98
58.72
62.14
69.7
62.69
57.45
56.32
54.61
45.01
62.65
92.82
91.69
91.49
72.48
77.08
84.94
84.08
88.59
86.5
93.22
92.63
94.32
93.98
91.82
94.1
89.25
88.69
94.03
93.95
91.0
95.92
94.32
90.7
89.3
70.24
67.17
81.17
72.05
72.98
65.46
72.35
90.4
93.39
84.3
79.15
76.02
55.8
58.01
90.69
90.32
89.22
95.06
93.38
94.3
89.93
91.42
89.93
90.04
87.58
87.06
91.3
90.96
91.02
89.13
81.0
83.7
89.3
89.25
91.46
90.72
90.55
90.72
92.55
91.41
86.0
88.9
87.07
86.74
80.09
75.64
94.5
96.7
97.92
92.18
92.57
90.39
90.84
91.0
92.0
95.32
95.55
94.39
95.24
94.0
93.46
88.29
90.17
92.99
92.95
90.04
90.32
59.68
92.07
93.0
92.51
94.0
88.0
92.3
95.43
94.11
94.5
92.66
92.65
94.24
93.43
94.52
92.0
80.0
90.65
91.4
92.49
89.62
90.18
89.53
88.47
92.21
76.05
73.41
82.61
80.38
78.73
76.58
82.8
75.0
77.03
71.79
73.2
68.4
77.5
92.8
77.2
75.48
64.15
66.1
86.0
89.5
87.85
87.47
89.78
91.3
89.4
92.5
95.23
96.73
85.6
89.8
92.3
89.67
75.17
72.77
93.79
58.58
78.89
95.54
95.32
93.85
84.29
78.66
81.65
87.87
86.9
78.01
92.59
11.14
87.72
87.15
84.04
91.2
91.12
90.5
19.97
89.74
89.85
89.61
91.0
90.3
90.66
84.3
88.9
83.0
90.8
67.34
68.7
95.63
94.61
95.64
94.98
79.1
81.42
95.64
81.44
77.14
92.45
91.08
91.1
91.08
92.82
92.12
87.74
9.5
83.48
90.7
91.78
93.21
93.8
92.2
94.5
94.0
94.8
89.58
92.57
90.82
91.12
89.11
87.86
3.93
94.1
80.01
91.99
92.24
90.22
92.24
89.83
92.32
90.5
91.24
51.22
46.37
87.71
79.53
80.24
88.89
88.91
89.3
86.6
78.86
77.87
85.13
82.29
86.51
81.89
79.98
79.52
62.27
74.37
88.15
84.36
85.8
86.4
81.5
88.18
92.5
93.89
91.87
91.25
93.96
94.7
82.65
65.88
71.8
71.64
91.6
92.9
79.34
78.58
81.58
80.96
74.45
75.43
76.67
67.11
63.07
68.08
83.29
75.42
47.31
76.98
77.8
77.46
73.55
63.5
47.25
75.25
80.94
74.0
87.83
84.28
6.58
81.2
3.63
77.49
6.3
76.01
4.97
78.98
6.22
79.17
78.85
55.95
72.51
63.71
64.51
56.62
79.97
61.96
62.8
59.65
79.3
82.8
66.61
64.44
66.82
52.9
49.94
35.4
68.3
69.29
64.85
6.52
76.0
95.15
95.2
92.88
92.51
91.6
93.69
89.97
71.49
92.86
93.52
95.27
94.62
95.04
19.68
89.43
91.54
77.0
81.0
92.52
91.32
81.34
81.58
85.03
91.58
93.3
67.5
68.6
69.05
79.45
67.2
91.4
91.21
93.22
91.78
90.17
88.94
94.28
94.25
96.04
93.66
92.24
94.18
95.0
94.79
95.22
94.7
94.74
90.61
87.78
82.9
89.7
86.41
87.8
82.5
87.8
88.0
85.1
91.1
91.6
92.3
73.1
68.37
78.17
81.96
74.11
74.1
92.47
92.93
86.81
89.2
77.28
75.78
80.13
76.03
73.88
74.89
73.7
70.64
63.8
85.66
92.15
95.82
95.3
87.96
86.46
93.0
94.52
94.34
94.75
91.54
94.23
94.24
73.5
87.88
3.06
91.28
87.97
86.09
83.43
88.28
89.09
88.6
91.87
93.6
95.67
93.6
89.67
93.2
94.69
92.93
90.4
93.13
91.04
94.09
90.24
87.01
82.08
83.23
94.13
93.1
73.46
86.42
95.11
96.1
96.06
87.04
90.11
76.85
57.4
69.6
70.13
90.07
90.07
80.16
81.88
93.0
91.88
2.0
93.0
93.6
60.0
88.2
88.42
87.0
91.2
2.0
2.0
96.1
88.89
2.0
95.37
2.0
94.64
93.7
89.76
89.21
77.39
72.47
89.08
81.3
93.39
88.87
72.33
78.48
70.73
62.75
80.63
8.68
90.67
4.68
79.99
87.74
79.6
47.77
74.89
72.04
90.07
79.8
4.0
89.44
94.78
95.28
80.75
91.4
91.49
77.08
84.08
86.5
92.63
94.32
94.1
88.69
93.95
95.92
89.3
67.17
81.17
72.35
72.98
93.39
76.02
58.01
93.39
90.27
89.22
89.22
89.22
94.68
94.68
94.68
93.38
89.88
91.42
91.42
91.42
87.06
91.62
89.13
91.88
83.7
90.69
90.69
90.69
89.25
90.72
90.72
88.9
86.74
75.64
96.7
92.52
92.52
92.57
90.84
92.0
95.55
95.24
93.46
90.17
92.99
92.95
90.32
93.0
94.0
92.3
94.11
92.65
93.43
92.49
90.18
88.47
73.41
82.61
78.73
76.58
77.03
73.2
75.48
66.1
89.5
91.3
92.5
89.8
89.67
95.32
84.29
81.65
88.42
86.9
87.15
91.2
90.5
91.2
90.3
88.9
90.8
81.42
91.08
83.48
91.78
93.8
94.5
94.8
92.57
91.12
87.86
92.24
92.24
80.24
88.91
86.6
77.87
85.92
81.7
79.52
74.37
88.15
85.8
88.18
88.02
92.5
92.21
91.87
91.87
91.87
94.7
71.8
92.9
74.89
75.42
47.31
76.98
77.8
77.46
72.04
73.55
63.5
82.8
52.9
61.51
66.61
74.0
80.94
93.69
89.97
95.2
92.51
93.52
95.04
91.54
81.0
68.6
91.21
93.22
88.94
93.7
94.25
92.24
95.0
95.22
94.74
89.21
82.9
89.7
87.8
87.8
85.1
91.1
92.3
68.37
74.1
92.93
89.2
75.78
80.13
73.7
63.8
92.15
95.3
86.46
94.34
94.75
94.24
73.5
87.88
93.6
93.6
93.2
90.4
91.04
83.23
96.06
90.11
70.13
90.07
87.47
75.96
72.84
72.84
81.34
81.34
80.38
78.24
78.73
76.58
76.58
75.0
76.73
76.73
71.79
73.2
73.2
91.25
93.96
94.7
94.7
78.95
93.3
79.45
67.2
93.6
68.7
77.14
88.6
77.48
76.3
2.0
93.3
93.3
75.61
68.51
94.34
90.66
76.2
94.08
93.1
71.65
62.07
94.08
94.34
65.26
68.51
88.34
92.02
93.14
92.73
91.63
14.56
53.83
90.21
61.12
91.71
90.35
90.2
7.15
94.12
94.31
89.79
89.47
89.47
93.54
96.33
70.58
72.6
73.32
76.1
91.81
90.25
22.63
91.69
93.25
91.51
14.84
68.9
89.21
70.78
92.5
89.18
14.8
89.88
69.11
73.06
88.52
90.37
88.68
88.91
92.82
56.27
59.3
45.0
6.5
5.8
6.3
6.9
1.2
14.16
5.23
2.03
5.62
6.41
4.69
3.3
5.0
6.61
7.1
5.0
4.73
1.2
1.54
1.0
0.62
7.47
27.9
5.06
6.0
4.41
4.51
2.41
2.8
14.08
6.6
3.42
3.34
1.7
3.48
5.2
2.96
43.95
8.9
61.57
40.2
48.65
52.0
9.45
9.0
68.15
46.99
3.0
15.46
23.27
1.0
53.9
28.97
67.62
72.88
94.99
5.31
5.79
2.52
55.2
12.4
72.95
2.65
1.36
1.61
1.75
2.08
3.15
2.5
3.52
1.12
1.13
2.77
2.28
5.9
3.91
1.85
4.56
4.07
6.28
49.7
4.65
4.5
3.05
40.48
1.6
0.9
3.0
5.05
9.96
71.42
1.67
12.55
6.1
1.64
3.0
2.0
3.75
61.41
86.03
49.9
77.0
1.7
6.96
2.03
5.0
1.2
1.2
1.54
1.0
0.62
2.41
2.8
2.8
1.7
2.34
2.34
1.61
1.75
2.08
3.15
1.12
1.13
1.79
4.5
2.8
1.64
3.0
2.08
3.15
73.42
57.26
58.21
20.21
18.58
70.29
67.13
53.39
69.46
54.95
63.33
68.72
57.27
64.06
58.03
55.87
68.7
61.3
48.29
35.72
69.38
50.15
60.5
62.44
58.42
61.19
73.03
58.21
69.56
60.31
69.97
60.6
71.33
58.22
71.41
70.82
53.91
76.29
70.75
74.86
77.11
65.67
77.89
66.88
70.81
58.81
62.01
79.38
76.4
59.39
65.2
55.6
77.2
69.98
4.0
67.8
52.83
64.53
57.87
84.16
56.0
59.18
45.2
26.2
66.56
59.79
57.72
53.8
59.72
58.83
74.6
61.06
69.53
69.19
53.56
68.93
68.24
58.1
53.93
53.22
54.84
59.33
58.83
60.05
51.54
57.71
58.9
59.55
46.05
55.7
51.9
53.44
58.83
61.2
51.93
53.39
54.8
57.85
58.79
46.1
49.53
57.9
56.8
59.3
57.52
51.08
52.79
62.59
58.7
60.3
57.33
64.46
56.74
63.54
57.92
65.37
58.09
65.37
57.36
64.83
58.82
65.9
65.05
64.5
65.92
65.35
64.83
66.2
64.67
63.8
65.54
66.75
65.62
67.88
57.9
57.31
58.49
58.1
59.3
60.38
59.78
61.29
60.76
60.21
61.58
59.98
58.83
61.71
61.74
60.74
63.25
60.33
59.68
60.97
62.98
62.38
63.58
54.66
53.95
55.69
70.32
61.05
60.38
59.13
71.46
62.16
62.19
57.78
56.97
58.97
70.73
61.15
62.5
71.86
61.98
63.73
59.92
72.01
71.4
72.62
63.87
64.28
64.37
65.87
55.78
58.37
59.36
55.85
54.3
70.62
62.11
61.73
62.67
72.42
71.79
73.35
72.7
72.21
73.43
61.04
73.17
72.95
73.51
60.31
68.8
68.26
69.61
62.02
52.77
61.34
52.03
63.03
53.73
59.75
52.87
61.08
49.58
59.07
52.48
59.96
48.3
62.33
50.45
61.78
49.35
62.88
51.56
61.23
47.67
59.93
46.32
62.83
49.4
64.79
63.88
66.16
55.24
48.47
48.12
53.85
47.33
46.87
57.48
50.41
49.9
51.51
44.87
43.4
54.51
48.74
47.73
53.0
45.96
45.9
56.35
50.25
49.4
50.4
43.48
44.49
61.05
53.65
48.97
60.11
52.93
47.18
62.0
54.36
50.84
53.22
47.36
41.82
62.15
71.89
65.44
56.73
66.62
58.49
66.88
54.97
61.6
66.32
54.27
61.09
67.44
55.67
62.1
69.31
61.97
68.57
61.36
70.06
62.58
66.1
61.56
65.43
60.92
66.86
62.31
71.12
54.18
69.04
54.68
59.59
68.8
53.83
58.46
52.36
69.29
55.63
60.72
68.73
59.51
73.04
69.89
64.12
54.76
63.43
53.91
63.43
56.48
61.49
54.99
63.95
57.96
58.42
51.34
61.52
56.04
48.37
61.69
55.53
47.99
61.33
56.5
48.86
59.52
51.84
48.28
66.09
58.36
64.87
56.81
49.56
67.32
59.92
64.39
64.21
64.21
65.24
64.17
65.01
59.38
59.16
57.52
70.08
61.82
69.37
63.45
70.73
64.68
65.59
67.26
61.63
64.32
64.09
65.58
70.73
71.99
72.48
72.16
72.96
69.47
61.77
59.17
55.94
58.71
57.05
70.52
64.67
91.96
92.77
95.3
94.88
95.0
74.6
69.74
95.4
54.9
91.8
64.99
78.8
88.45
98.35
0.6
69.15
98.35
76.9
78.2
72.44
88.45
98.75
6.61
28.3
2.83
88.8
66.6
96.18
71.1
97.21
86.15
88.33
85.69
1.99
62.1
66.6
66.6
63.9
88.43
6.05
70.51
0.86
84.5
84.52
99.11
76.2
7.4
94.19
87.49
3.44
4.13
3.95
99.93
99.95
99.9
98.36
98.87
99.95
100.0
95.41
86.89
1.28
99.95
86.95
86.58
87.2
86.5
86.7
95.03
86.49
86.56
86.59
86.94
86.53
86.29
85.71
86.22
86.38
86.86
87.02
86.17
87.88
86.98
89.9
86.78
86.98
92.34
87.28
99.9
87.03
79.4
86.54
86.7
86.56
87.16
77.76
91.23
91.18
87.14
85.69
88.8
99.8
89.49
89.78
99.74
89.62
89.62
94.78
87.6
99.8
85.62
89.4
88.45
91.1
98.35
89.3
87.49
85.81
86.85
99.8
2.9
84.32
80.79
31.0
80.51
87.4
1.5
86.34
4.18
3.4
3.73
99.3
97.8
3.1
3.1
99.39
97.8
3.1
99.09
3.2
98.93
4.1
98.94
1.7
7.99
98.37
83.78
83.5
85.6
86.17
95.2
79.16
57.4
87.83
87.97
87.97
58.2
88.15
84.2
85.3
1.43
96.26
49.06
89.35
0.52
92.87
86.08
91.15
1.43
81.49
2.0
81.4
1.28
81.26
1.3
81.34
87.47
86.7
87.9
86.9
69.65
0.4
80.9
99.7
5.09
99.7
3.5
0.13
5.09
99.62
4.3
0.13
91.18
3.5
99.41
99.7
99.9
100.0
92.38
90.31
55.5
89.15
0.14
87.15
1.8
99.9
99.9
31.0
46.5
99.54
87.0
12.8
92.26
55.2
87.18
59.2
88.08
74.1
99.9
48.4
88.08
99.98
99.97
99.96
85.4
100.0
100.0
100.0
99.97
2.51
93.38
91.91
98.78
90.15
91.06
78.2
72.6
60.3
57.5
41.4
72.53
99.8
3.4
90.35
50.09
88.88
99.7
99.7
0.3
63.9
62.1
89.2
98.2
99.98
1.1
80.93
99.97
99.89
99.79
86.59
99.85
94.44
98.7
98.8
98.8
98.8
92.2
91.8
91.9
91.6
91.9
92.2
92.2
92.4
92.4
87.8
87.9
88.0
88.4
87.3
87.3
88.45
98.35
87.08
98.35
4.89
77.79
98.78
82.32
88.4
87.58
94.44
87.1
89.28
86.73
98.35
97.94
83.87
93.2
93.0
86.39
89.63
88.1
8.3
73.37
50.3
75.66
79.22
70.86
79.26
74.13
76.31
69.63
80.36
58.81
47.5
78.93
69.8
81.22
75.92
75.61
16.14
83.95
78.03
59.76
76.35
77.55
77.33
68.26
59.31
49.5
84.63
81.11
80.35
79.22
73.36
83.38
79.65
71.48
80.34
76.12
70.27
72.05
64.16
55.22
59.7
71.52
79.63
81.03
63.55
53.27
69.17
75.85
70.15
71.67
68.46
70.85
83.24
77.01
70.52
83.07
74.24
81.36
79.13
73.25
78.92
72.97
79.31
78.18
86.75
73.65
71.12
62.97
79.08
74.67
67.73
75.67
71.02
60.14
68.5
72.0
71.64
75.38
70.77
72.66
65.39
75.52
74.04
73.15
68.0
68.07
59.61
66.86
75.37
78.27
72.14
78.09
68.19
73.58
60.09
77.97
69.04
78.77
72.79
76.87
70.35
75.95
76.55
69.94
62.5
79.71
79.5
76.34
73.38
68.26
78.9
70.24
71.42
71.87
70.5
68.09
59.09
59.83
78.14
70.58
64.02
73.19
74.03
63.16
76.95
72.77
70.83
80.27
74.71
79.9
74.52
79.57
77.55
74.66
79.02
79.69
79.69
71.0
79.18
80.58
82.24
79.37
80.95
78.11
83.01
52.86
71.56
75.85
74.91
74.07
74.56
60.1
78.98
61.55
63.64
65.26
97.7
80.56
80.58
61.15
80.25
89.04
64.72
78.19
85.14
82.06
82.53
58.44
73.82
78.55
64.54
66.0
32.0
72.0
70.77
70.03
68.72
59.83
75.21
64.02
74.02
68.79
73.36
62.64
73.41
66.83
80.31
69.68
71.22
70.94
61.88
63.49
73.88
75.68
69.04
61.73
62.63
78.51
73.47
72.03
76.1
58.63
62.85
59.62
65.6
68.44
70.65
68.42
71.91
59.22
69.17
73.99
73.72
63.36
62.28
68.98
70.45
65.09
74.23
67.33
73.31
75.1
66.76
61.12
60.5
64.12
66.97
77.67
79.06
74.65
64.89
64.75
70.47
67.0
73.8
68.72
84.05
80.8
82.98
86.2
81.95
71.5
69.4
60.38
64.57
71.07
70.71
78.08
71.59
67.78
70.63
81.99
79.34
81.86
78.37
78.45
74.33
71.86
69.51
75.67
13.44
66.29
40.58
35.45
65.17
72.0
71.33
69.34
71.46
71.48
73.5
11.02
65.74
11.0
65.74
75.64
12.39
64.65
77.56
10.77
66.57
10.7
69.0
69.89
11.75
66.94
78.04
11.75
66.93
11.75
66.94
77.96
11.9
66.99
12.1
63.81
70.45
10.06
61.2
11.33
62.95
78.19
11.71
63.24
11.1
62.98
11.32
63.08
70.1
10.98
71.54
80.32
3.58
7.68
60.21
78.55
75.51
11.05
69.7
11.95
70.04
79.63
77.59
9.38
69.13
8.26
69.64
10.17
69.79
77.08
12.07
67.15
10.44
71.08
9.68
69.23
9.05
72.66
13.42
10.8
72.51
8.62
69.49
6.5
41.78
1.45
1.81
6.39
1.78
4.26
2.12
6.91
2.17
1.14
1.23
7.8
7.8
10.59
68.55
77.75
48.98
7.48
50.4
8.54
62.55
1.95
0.8
43.02
55.02
59.65
5.16
3.81
7.25
4.61
6.94
88.05
5.8
4.98
71.15
66.0
68.02
84.95
87.26
5.78
50.52
81.64
70.01
8.43
68.8
8.34
67.19
64.87
34.62
90.36
7.82
68.11
70.6
61.21
1.93
1.2
1.47
1.48
10.28
66.59
81.28
71.12
89.0
87.4
88.1
91.4
90.9
85.61
1.55
85.61
78.39
78.69
70.71
59.56
69.4
73.7
82.7
82.2
82.4
87.1
77.0
80.9
83.4
90.5
90.27
89.76
92.74
93.14
90.98
92.69
88.38
92.03
89.89
92.67
88.38
91.53
91.32
86.39
92.77
91.95
87.63
91.13
90.92
89.69
93.18
87.41
82.96
87.62
86.8
85.56
80.7
79.35
84.67
77.0
77.59
76.41
78.18
78.18
77.59
78.18
86.29
72.95
72.95
85.8
89.8
81.8
84.5
77.3
82.5
84.0
91.4
88.08
82.87
66.29
65.74
75.64
65.74
64.65
66.57
69.0
69.89
66.94
66.93
66.94
68.86
66.99
77.96
63.81
61.2
62.95
70.0
63.24
78.19
62.98
63.08
71.54
60.21
66.72
66.87
78.55
69.7
70.04
69.13
69.64
69.79
67.15
71.08
69.23
72.66
72.51
69.49
1.45
1.81
1.78
2.12
2.17
1.14
1.23
0.99
68.55
77.75
62.55
1.95
5.16
3.81
4.61
2.7
6.94
5.8
5.8
4.98
4.98
75.14
63.33
69.83
84.55
5.78
50.52
70.01
68.8
67.19
60.0
65.6
69.1
70.9
72.0
64.8
70.0
61.2
72.8
74.1
79.0
71.1
76.4
73.0
66.69
73.4
62.4
62.1
73.0
71.8
70.7
70.4
59.1
68.0
54.1
61.7
56.8
67.5
54.4
53.7
57.5
41.9
62.1
54.1
41.9
64.0
55.6
54.3
64.8
66.8
62.8
49.3
50.9
54.0
46.9
47.4
47.4
62.0
65.5
61.9
71.4
65.5
65.5
66.0
49.8
70.8
66.0
60.5
54.3
62.6
59.8
75.0
70.9
55.6
79.7
42.5
73.1
70.8
64.0
42.9
74.4
56.4
48.8
54.0
55.4
58.1
50.4
71.26
60.7
53.72
73.42
61.96
22.54
26.14
67.01
56.8
74.86
61.79
64.32
57.48
74.11
63.89
67.17
60.66
74.44
64.92
60.3
54.13
73.57
62.49
56.55
51.57
52.5
72.55
60.98
62.76
50.8
47.06
47.89
70.44
58.83
60.13
61.39
45.2
55.03
56.26
72.99
49.96
61.38
63.32
61.76
44.22
54.69
55.92
74.14
49.32
62.28
64.32
61.9
45.18
55.92
55.85
72.36
49.64
62.46
62.82
73.74
56.23
63.53
59.8
51.15
73.78
59.95
25.56
26.12
68.69
55.58
74.49
59.33
66.75
57.87
74.35
63.92
56.89
50.44
71.4
60.86
62.78
59.66
70.24
64.96
61.07
42.64
72.51
47.86
72.84
57.08
75.91
60.16
24.77
21.65
74.8
55.49
51.31
58.34
66.1
75.82
56.18
53.14
60.68
67.01
69.44
52.02
60.73
74.79
56.96
64.59
71.15
53.33
59.91
75.18
56.08
64.64
74.78
56.4
65.31
76.58
58.88
66.66
74.05
55.28
64.68
76.64
58.2
66.47
72.6
56.98
65.54
76.29
59.24
66.9
71.85
54.49
62.66
75.94
58.55
65.74
76.39
59.29
66.16
66.76
74.08
65.9
71.2
53.55
65.09
71.59
70.97
57.92
70.89
61.7
38.1
65.35
74.57
66.54
72.54
63.87
76.3
68.81
71.45
62.43
73.57
65.23
74.38
66.28
75.84
68.21
72.63
63.98
75.55
67.83
69.35
55.58
58.3
72.82
60.61
58.82
74.51
61.37
54.3
73.83
62.07
79.2
75.73
60.71
79.78
76.89
68.56
76.71
64.2
77.69
62.18
79.23
70.45
79.07
67.67
71.37
56.67
56.2
70.89
59.86
59.87
79.7
75.83
80.5
77.59
58.68
73.77
59.65
70.6
55.7
78.15
66.38
78.15
71.25
79.16
73.63
66.6
57.86
74.53
64.08
59.47
55.09
63.17
55.82
67.01
56.8
66.38
58.99
68.73
61.43
61.32
54.85
59.55
53.31
54.33
53.68
49.03
49.59
63.36
45.46
56.7
56.98
63.3
44.92
55.77
57.07
63.39
45.65
57.01
56.95
64.03
54.8
66.02
56.76
67.05
59.01
59.95
52.17
56.61
52.47
62.0
43.73
74.4
74.0
75.4
36.15
67.67
55.95
54.77
57.36
59.72
76.92
61.74
77.45
62.98
64.93
58.71
73.22
63.75
25.08
24.0
68.31
60.47
75.13
66.93
66.33
59.65
73.98
64.54
67.64
60.82
74.08
65.3
62.63
56.2
73.68
62.18
66.86
59.95
74.13
64.08
68.46
61.99
73.45
64.85
66.8
62.0
72.17
64.45
59.01
57.53
71.17
63.78
62.7
55.31
72.39
61.05
63.82
51.03
73.95
56.98
62.13
56.63
71.62
62.25
64.25
59.53
65.1
60.48
75.5
64.48
65.08
73.95
68.84
64.14
64.5
65.43
64.93
71.15
64.23
67.07
59.78
67.2
66.1
74.7
72.57
75.38
73.25
61.46
29.57
25.36
19.17
73.11
78.52
54.77
71.69
70.59
21.77
74.58
75.07
60.09
69.49
81.02
64.6
70.8
66.59
69.29
66.65
77.84
72.6
85.78
73.96
85.01
58.74
66.5
68.14
74.43
55.36
71.98
66.43
74.35
68.3
73.5
66.69
74.54
60.93
74.49
72.43
54.64
64.22
72.9
66.7
71.67
60.21
64.96
67.56
47.82
54.39
56.87
67.84
63.15
50.12
58.22
60.04
66.64
74.37
51.28
64.7
56.45
62.47
50.14
61.18
55.93
66.31
64.76
69.53
63.79
74.43
74.04
59.87
65.32
75.2
64.65
77.96
63.28
66.44
38.19
32.69
44.47
35.99
75.85
61.3
61.41
62.96
33.81
28.27
32.7
32.0
26.9
32.9
26.7
9.2
28.9
37.76
27.7
33.15
29.69
28.9
37.8
29.2
47.2
7.8
27.11
39.1
35.8
34.7
28.3
33.0
20.61
30.1
35.7
36.94
31.46
44.0
38.5
36.7
31.2
32.1
30.6
40.0
37.9
31.8
33.6
27.8
46.0
35.7
44.0
46.0
39.6
42.9
41.0
37.3
31.0
35.2
24.23
37.8
37.1
36.42
30.4
34.8
35.3
39.01
24.25
32.7
26.0
6.51
6.1
4.2
64.8
4.6
64.9
33.2
3.73
32.9
45.4
3.6
46.1
22.04
3.9
24.4
20.7
32.2
21.9
29.1
31.7
3.3
30.5
25.3
6.94
4.4
28.0
3.1
32.3
25.87
23.1
28.4
18.57
19.6
6.0
29.7
29.4
3.5
23.3
22.38
22.1
4.0
7.18
25.1
45.6
44.2
3.9
13.6
2.8
12.6
4.6
11.8
4.5
7.36
3.57
9.88
3.0
12.08
3.0
5.7
3.11
2.0
1.65
16.5
8.0
5.3
3.39
2.0
19.5
10.1
5.8
5.7
11.0
5.3
15.3
5.8
6.4
7.28
11.5
12.6
4.0
5.9
2.8
13.1
3.6
3.3
3.5
5.1
4.2
6.5
3.7
4.4
6.29
14.08
5.0
8.9
1.66
2.2
7.4
5.1
4.2
3.55
3.28
6.1
4.3
6.4
4.8
5.1
4.9
5.5
4.7
5.5
3.8
5.0
4.0
5.05
3.14
3.9
2.93
2.75
3.2
3.4
2.94
7.6
40.5
23.2
45.6
21.0
5.5
3.6
24.3
31.4
27.1
20.4
20.82
16.76
19.6
16.3
17.9
38.2
22.0
35.6
43.56
32.97
40.2
35.0
40.6
32.07
42.3
37.2
45.7
41.0
52.6
54.7
29.0
5.3
3.0
37.7
24.96
30.18
30.8
39.5
32.6
30.5
23.6
33.0
35.0
4.8
48.37
9.05
53.0
9.1
52.9
52.9
53.2
9.1
10.8
8.8
52.8
52.2
47.3
50.9
47.9
52.5
51.2
46.2
45.8
33.92
49.7
43.2
49.7
49.2
60.9
37.6
41.7
43.3
37.4
54.4
18.25
19.5
50.39
58.5
47.0
7.6
10.6
17.82
7.18
9.8
8.5
32.6
11.7
28.44
30.4
44.0
30.1
37.0
33.1
34.8
34.18
38.0
46.0
31.0
43.5
29.4
24.8
28.9
22.7
6.4
14.09
14.33
45.89
32.43
37.95
42.0
28.8
5.0
4.0
6.2
0.2
1.7
69.0
5.08
6.35
6.2
5.7
34.0
35.9
29.3
26.4
27.0
52.5
29.1
6.1
7.2
8.5
19.7
30.59
32.6
32.6
32.6
7.8
32.1
33.6
36.7
21.9
23.1
3.5
3.7
4.6
4.1
19.5
5.1
4.03
4.1
3.5
3.1
2.7
24.3
27.1
30.4
27.1
3.1
27.1
25.4
42.1
42.1
42.1
52.2
37.6
37.6
21.0
11.7
6.0
44.1
26.8
31.0
3.1
3.4
12.04
12.5
12.5
10.5
11.3
12.5
12.75
12.5
12.5
12.5
12.75
12.75
12.75
12.75
45.6
14.5
41.8
47.66
46.06
5.0
5.01
11.5
13.49
9.32
12.03
10.34
9.99
11.43
10.28
11.53
10.41
3.0
6.35
14.99
14.99
5.22
6.4
5.3
4.0
3.1
4.1
5.7
3.0
4.0
10.0
33.6
3.6
1.57
3.12
39.89
12.78
38.82
3.1
36.12
35.5
27.86
3.2
42.6
47.3
34.2
4.2
17.65
4.81
10.62
10.51
40.34
31.57
36.48
34.95
43.8
14.04
10.46
39.94
4.37
4.99
41.09
17.78
7.96
8.26
19.25
2.59
2.73
35.62
3.32
25.48
22.38
21.54
12.99
21.29
7.12
27.26
5.93
4.45
4.48
31.78
18.98
7.3
9.85
39.6
37.55
38.64
32.43
33.55
21.13
45.91
3.0
2.5
3.0
2.3
49.5
3.0
47.7
2.5
3.0
2.7
2.0
2.7
2.7
2.7
2.7
2.7
2.7
2.0
2.2
7.5
8.0
42.9
43.3
42.44
44.99
35.29
23.36
1.07
1.2
2.0
2.0
1.57
1.3
7.0
12.3
10.2
3.9
3.1
2.4
6.4
7.3
6.4
3.6
3.2
5.9
2.55
2.64
3.32
1.2
5.0
3.3
2.8
2.5
1.8
2.6
1.8
2.22
2.0
3.13
2.5
1.67
3.9
5.8
5.9
5.9
2.64
1.66
3.14
9.2
9.0
6.6
1.6
6.69
8.2
15.0
8.3
1.23
5.25
1.54
8.5
6.79
6.69
0.9
1.34
1.91
0.7
0.5
7.7
nan
0.75
2.67
1.3
59.85
57.2
59.8
9.03
15.0
0.94
68.05
61.0
69.6
66.1
2.3
6.74
9.81
7.66
10.93
10.85
7.99
1.9
1.0
1.3
6.3
1.63
1.17
6.99
nan
24.0
61.43
4.5
16.4
3.67
2.3
2.9
1.5
74.52
75.9
74.59
1.59
1.07
1.9
11.2
54.9
37.98
nan
1.5
1.52
6.3
1.57
33.0
13.47
1.27
2.48
1.7
9.05
0.45
6.1
0.65
1.5
1.6
0.7
6.4
1.44
1.0
4.6
6.3
2.2
5.55
8.51
1.19
5.8
4.23
1.82
3.04
2.6
0.9
3.0
2.7
78.86
1.7
73.45
nan
1.0
84.39
1.93
94.74
13.0
9.09
62.94
69.46
3.2
73.6
62.91
7.8
4.0
73.13
73.94
74.4
75.15
4.8
72.42
4.0
73.97
71.66
2.6
73.5
74.16
74.44
3.9
74.49
73.43
75.01
75.86
80.39
82.11
10.36
93.2
71.84
75.6
1.0
79.29
0.4
80.98
6.5
17.0
21.0
15.1
15.07
75.71
74.63
76.93
76.25
76.23
1.19
1.65
1.5
0.6
13.33
0.86
0.7
1.9
35.2
1.26
1.6
1.1
4.1
1.61
1.66
6.99
6.99
65.52
78.3
62.99
1.47
10.2
55.7
60.0
14.7
14.6
10.2
2.42
66.9
86.4
80.49
1.7
65.3
56.45
2.99
17.1
30.47
29.77
7.12
5.45
33.2
21.87
5.78
5.78
5.3
8.7
8.7
73.4
8.51
71.23
10.89
2.8
73.62
4.1
74.96
2.2
73.4
3.7
74.6
0.7
2.9
1.9
0.7
73.2
5.2
73.62
1.34
0.02
0.23
8.75
8.0
62.16
21.8
22.01
22.81
24.0
21.1
32.39
22.7
4.47
30.1
30.1
15.6
3.83
32.0
19.8
33.0
14.69
3.83
3.83
3.83
12.18
14.07
15.27
7.82
4.85
0.55
9.16
73.3
63.8
4.3
1.6
6.7
6.45
6.0
6.1
19.1
2.1
18.27
2.37
1.86
1.9
5.9
6.3
2.2
6.8
2.0
4.6
2.3
1.8
1.0
2.0
1.3
1.7
3.0
13.7
6.0
2.0
5.9
5.0
4.9
15.29
1.66
2.63
2.0
0.7
1.0
6.7
6.7
2.8
4.1
5.2
4.0
3.9
34.5
30.1
4.6
1.5
1.2
4.1
2.8
1.9
1.9
1.9
3.3
3.3
3.3
5.8
5.9
6.3
5.9
2.0
9.2
6.6
1.0
1.7
79.96
1.7
2.3
3.0
3.0
13.88
64.35
8.83
71.85
65.94
94.03
63.51
64.89
62.71
63.42
63.32
59.11
63.52
66.48
67.86
64.4
67.34
45.51
46.65
54.69
82.38
83.91
56.58
63.2
64.71
1.66
1.5
61.0
55.7
0.97
1.25
1.37
1.0
2.44
0.43
0.03
9.14
1.6
32.15
22.94
5.05
0.18
78.89
4.84
0.0
11.84
11.29
75.16
11.37
9.44
10.09
68.8
9.75
8.41
75.63
11.15
9.0
77.76
10.37
4.71
10.91
9.79
9.81
9.79
10.26
11.18
12.59
10.33
10.17
8.32
8.56
72.57
82.53
8.67
71.41
6.55
84.0
13.28
10.37
73.09
8.22
12.37
72.96
11.62
68.44
9.86
70.36
8.38
70.34
12.89
68.61
13.29
68.53
10.46
76.63
62.5
6.13
11.89
10.6
10.75
10.97
11.4
12.67
12.4
10.99
10.51
10.01
12.76
13.1
12.17
9.57
10.42
10.94
9.89
11.12
10.74
11.92
10.59
13.36
12.51
10.08
47.75
7.76
73.93
11.97
10.0
68.31
31.0
68.56
30.1
68.58
68.71
68.86
9.9
62.13
9.23
59.73
9.89
68.37
7.34
67.15
9.01
67.73
8.72
68.52
1.18
6.88
73.01
9.21
67.91
4.93
9.9
62.13
9.23
59.73
7.34
67.15
8.34
68.14
13.36
12.11
8.21
8.55
11.91
73.82
71.61
11.07
65.18
11.02
66.56
8.82
74.93
9.23
59.73
67.73
10.37
10.83
10.91
9.79
10.26
62.13
11.18
12.59
10.33
10.17
82.53
68.44
11.92
62.13
9.01
67.73
9.9
62.13
11.18
11.62
68.44
9.86
70.36
12.89
68.61
13.29
68.53
12.67
11.92
9.9
67.73
62.13
11.18
59.73
68.44
11.92
9.23
11.85
11.85
12.01
12.01
12.01
12.68
12.68
12.68
12.82
12.82
12.85
12.85
8.67
10.26
12.42
11.92
50.06
46.67
56.6
44.48
52.51
42.99
28.4
32.82
45.47
43.92
51.14
48.1
66.7
32.63
37.93
52.58
48.82
50.72
33.57
49.27
12.65
63.64
3.75
5.36
56.5
59.7
60.9
48.99
45.7
76.7
29.2
53.38
53.57
47.97
95.51
90.46
87.05
80.37
89.1
82.45
48.01
42.15
52.53
53.17
54.37
60.0
60.9
55.77
49.61
54.45
55.19
35.63
50.68
52.7
54.24
59.19
63.23
66.89
62.67
69.11
37.4
58.15
57.02
72.35
76.79
66.24
70.44
62.05
72.51
38.63
45.78
48.06
42.17
51.2
47.16
46.56
40.67
46.85
59.55
50.05
51.09
43.93
47.31
56.3
48.44
45.76
38.45
44.82
49.41
42.67
50.51
42.1
55.7
53.74
52.37
50.8
51.15
53.96
47.8
46.7
56.51
63.08
58.17
73.42
72.05
36.58
24.52
65.75
65.02
70.04
70.08
69.45
38.55
79.62
78.73
68.13
27.88
54.35
45.82
48.02
47.57
48.83
48.47
50.2
48.81
63.08
56.51
58.17
46.28
43.46
46.71
44.24
44.53
46.53
45.84
45.76
45.0
50.37
48.9
51.3
36.63
58.41
57.5
48.25
48.06
55.84
54.94
59.67
44.15
40.62
69.25
43.95
45.97
44.59
56.43
54.92
55.29
53.28
43.02
48.44
44.7
57.02
58.78
58.42
56.82
53.17
60.9
61.0
61.21
37.4
58.15
67.32
43.29
43.4
38.77
41.35
40.8
50.2
44.87
43.42
41.58
43.4
41.9
50.77
44.16
43.6
50.57
43.3
43.39
42.57
51.1
44.9
44.98
41.21
41.48
42.68
36.27
40.15
41.17
49.15
43.17
43.05
38.92
41.77
41.53
50.4
47.03
40.11
45.85
47.13
57.68
41.36
58.65
76.0
57.37
63.0
50.42
48.24
36.98
45.85
40.11
47.03
63.64
64.02
57.27
58.81
0.56
61.74
63.9
49.41
50.68
22.5
47.0
50.34
66.41
54.9
66.05
51.35
52.76
46.11
47.43
52.58
38.94
49.96
42.29
34.71
44.62
45.91
40.7
40.6
81.42
77.38
87.2
93.93
74.61
78.18
46.9
48.1
35.08
46.4
33.57
46.34
19.62
55.29
57.52
50.3
47.16
50.34
50.92
48.36
54.56
50.54
46.64
57.3
51.98
52.52
48.02
53.61
48.61
45.17
44.9
61.74
63.9
26.52
72.84
45.18
47.11
28.4
73.99
47.93
35.62
35.52
66.44
63.77
65.65
56.44
26.98
65.71
64.78
65.68
53.85
56.16
55.6
52.09
46.4
51.42
51.44
47.99
41.91
64.77
64.18
29.63
63.18
55.85
49.48
48.14
46.4
40.9
52.52
48.02
78.98
65.61
64.24
64.96
56.16
33.87
55.45
51.92
51.37
44.57
41.78
43.95
48.15
41.87
43.32
42.38
46.8
47.31
43.22
38.83
43.06
36.05
58.78
58.42
42.62
60.44
33.57
38.53
40.38
43.55
43.12
37.28
42.57
43.33
51.6
51.6
49.9
46.4
46.1
46.01
47.37
47.58
45.92
24.52
50.92
43.37
43.37
46.3
49.0
45.3
59.9
64.0
66.0
68.2
54.4
56.5
59.1
81.39
77.82
73.0
78.2
65.7
58.05
50.0
48.96
80.91
79.12
30.5
42.44
75.69
80.78
62.58
70.32
72.78
77.68
78.8
82.15
76.36
73.1
50.48
50.99
72.94
38.14
75.6
79.7
81.4
81.4
82.4
81.7
76.1
78.1
79.0
78.1
51.3
51.5
42.0
48.8
46.0
52.3
53.2
53.5
80.1
80.8
51.33
54.18
53.37
71.24
71.16
69.09
8.05
61.6
47.21
48.48
46.94
81.4
78.1
77.89
69.39
70.99
60.99
50.32
53.15
51.9
74.33
70.87
54.83
75.0
72.62
73.9
75.2
76.4
76.0
76.4
72.1
77.9
7.7
74.06
74.77
73.2
74.0
75.5
75.4
68.0
72.4
74.0
8.19
69.33
72.58
64.67
55.6
65.49
56.87
64.06
54.5
65.0
55.38
73.0
65.1
73.52
66.28
72.87
65.57
72.79
72.49
65.02
72.54
64.65
70.0
61.93
71.19
62.22
72.05
64.53
72.72
67.13
71.51
63.35
73.28
65.76
72.8
65.65
73.25
65.68
72.51
64.88
70.46
62.04
72.45
65.46
72.19
64.28
65.79
68.73
70.24
69.33
56.64
57.54
57.0
70.58
72.11
71.19
60.35
61.45
60.79
69.48
71.41
70.25
60.05
60.96
60.41
59.17
60.8
59.82
73.2
74.46
73.71
60.08
60.97
59.49
72.51
72.79
72.32
57.56
58.92
58.11
52.51
61.36
57.57
66.7
66.0
67.76
59.08
58.12
60.52
68.11
67.31
69.3
72.3
73.01
60.3
59.63
61.29
53.8
52.71
55.43
57.29
56.78
58.05
73.3
72.83
74.01
52.01
50.69
53.99
63.84
63.23
64.76
59.76
59.49
60.15
51.91
51.36
52.74
66.33
65.78
67.17
55.22
54.74
55.93
64.48
63.98
58.66
60.3
60.57
62.56
69.24
68.58
70.21
70.14
69.65
70.89
59.69
59.13
60.51
59.55
58.26
61.49
57.0
69.5
56.33
68.91
58.01
70.4
52.29
65.6
51.62
65.19
53.31
66.22
60.91
69.93
60.09
69.22
62.15
71.0
51.12
61.7
50.5
60.48
52.05
63.52
52.36
53.01
52.62
52.38
54.66
53.29
60.8
60.35
61.47
53.5
55.98
54.49
53.79
52.62
55.56
61.77
60.9
63.08
56.07
55.35
57.16
67.25
66.55
68.31
58.69
51.41
50.82
52.3
63.17
62.64
63.96
55.59
54.37
57.42
63.02
61.82
64.83
46.49
45.56
47.88
53.91
52.74
55.67
63.64
72.28
62.62
61.65
64.07
72.93
72.52
73.56
60.67
60.0
61.68
60.91
59.74
62.67
70.59
69.79
71.8
62.92
62.57
63.44
63.93
64.36
72.67
73.27
71.57
70.99
72.46
57.18
55.8
59.26
67.31
66.5
68.53
60.74
59.75
62.22
63.52
62.52
65.02
57.1
57.2
56.9
67.4
66.5
68.6
56.8
55.6
58.6
58.0
56.9
59.7
66.4
65.1
68.4
63.56
72.42
66.47
36.51
31.2
30.25
30.44
25.17
28.13
71.21
72.95
65.2
66.42
70.09
73.31
73.05
61.91
63.07
53.09
61.92
52.58
73.65
64.6
72.33
72.52
57.21
47.68
54.63
46.27
60.9
72.64
72.35
73.08
72.51
72.24
72.93
73.09
72.88
73.4
73.07
72.81
73.46
71.5
71.05
72.17
68.75
67.82
70.15
71.7
71.3
72.31
64.35
63.7
65.33
64.56
63.99
65.14
65.06
64.5
65.92
72.96
72.66
73.4
72.96
72.66
73.4
73.43
73.18
73.81
73.43
73.18
73.81
72.44
72.04
73.04
70.63
69.94
71.68
72.44
72.04
73.04
64.79
64.17
65.71
64.96
64.37
65.87
65.35
64.83
66.2
71.68
69.94
70.63
66.35
65.33
54.87
57.68
55.99
60.58
62.99
61.54
64.65
60.46
73.11
54.88
67.95
58.64
73.75
73.5
59.68
56.8
69.43
65.38
74.14
61.51
73.62
56.39
70.81
62.27
78.07
64.4
74.57
72.35
31.16
29.04
66.44
64.7
80.52
66.44
70.39
73.1
73.84
62.38
71.68
61.82
71.32
61.77
59.61
70.41
15.41
19.91
56.26
57.67
59.69
69.48
71.79
56.95
65.24
77.71
82.19
57.82
70.23
38.97
53.33
54.66
70.11
55.95
68.67
52.86
63.38
64.99
72.9
60.32
71.79
54.29
68.68
61.87
71.41
62.23
61.45
72.22
71.87
52.4
60.78
59.47
71.18
71.72
63.81
65.29
63.26
60.82
74.75
67.96
68.68
66.43
64.55
58.54
56.49
58.77
63.35
64.72
65.81
66.27
62.72
73.41
64.32
64.92
64.62
60.02
65.57
67.09
60.69
62.86
60.38
62.13
63.61
64.65
60.34
57.16
50.5
66.19
61.57
61.09
64.02
73.24
65.78
66.9
62.58
64.76
69.45
61.24
63.21
58.58
61.33
65.66
57.98
60.61
55.9
58.98
61.87
55.99
59.11
54.54
57.7
58.09
55.28
58.69
54.5
57.5
72.9
71.11
73.31
72.68
62.45
62.67
65.47
64.65
66.61
66.31
62.79
58.64
72.58
60.61
73.76
73.43
65.52
69.95
62.93
70.62
57.84
73.32
65.93
57.54
63.32
71.49
61.96
75.02
64.29
72.91
72.51
73.27
56.39
59.82
72.89
71.44
71.99
65.26
64.73
61.13
56.44
71.28
70.17
72.51
62.22
70.3
61.68
63.27
61.99
74.12
74.26
59.29
61.39
73.97
72.63
73.17
64.27
81.65
72.41
63.79
71.33
65.55
73.48
74.48
73.98
74.99
64.79
65.51
72.08
72.84
58.8
59.34
51.58
4.22
2.8
17.59
12.9
7.99
14.0
7.0
9.5
8.0
22.9
4.51
2.04
0.34
9.0
14.0
9.83
20.1
10.87
9.38
2.04
2.5
15.0
8.5
0.9
2.09
1.94
4.54
7.0
9.23
9.34
9.43
11.65
7.88
2.0
8.74
9.86
6.31
2.74
3.73
12.04
5.05
11.26
2.8
11.0
6.23
3.7
7.18
9.3
5.56
5.8
3.06
15.52
2.27
1.35
92.87
90.65
91.18
88.5
86.8
81.1
81.8
83.2
85.7
88.5
87.7
87.9
89.84
94.0
89.0
88.0
88.1
88.6
86.2
71.2
85.4
87.41
12.08
83.85
86.53
90.46
89.75
37.44
89.52
71.0
67.0
60.27
65.67
73.72
76.09
74.68
50.14
55.28
58.36
64.96
51.4
86.91
34.7
39.43
40.8
44.94
43.84
41.9
41.6
27.1
29.2
40.5
39.75
29.6
41.0
36.8
35.1
39.43
36.9
2.5
39.25
37.5
2.5
44.3
37.5
36.6
40.9
33.6
38.23
2.5
2.5
2.5
2.8
3.0
5.7
1.8
3.5
2.0
2.5
4.0
4.5
nan
8.0
8.5
2.8
2.0
3.75
2.8
8.5
9.5
2.7
2.7
2.7
3.0
2.7
2.5
2.8
2.7
3.0
2.8
3.0
2.5
2.35
6.0
2.5
2.5
2.5
2.0
2.5
2.0
2.0
2.2
2.2
4.0
4.0
2.5
2.0
2.0
2.0
1.4
6.0
2.0
3.5
2.0
1.2
1.0
2.5
1.0
1.77
2.0
2.0
1.9
2.0
2.0
1.0
1.0
3.8
1.0
3.8
1.7
1.0
3.5
2.7
2.7
2.5
2.5
3.0
3.5
3.0
4.5
2.7
3.0
2.0
2.8
1.82
2.0
2.5
9.0
2.5
2.0
2.5
2.5
2.75
2.4
3.0
2.5
2.5
3.0
2.8
3.9
6.0
2.4
2.5
2.5
2.5
2.0
2.0
3.0
2.2
2.4
2.3
2.5
3.0
2.65
2.3
1.9
2.5
2.2
3.0
2.3
3.4
3.5
4.1
2.5
2.8
2.0
2.0
1.7
1.7
1.7
2.5
2.5
3.0
12.8
12.8
12.8
12.0
12.75
12.8
12.75
12.75
12.75
12.8
12.75
12.75
12.8
12.75
13.6
13.0
12.8
12.8
12.8
2.5
2.5
2.5
2.8
2.8
2.8
2.8
2.5
2.5
12.75
12.75
2.2
3.1
2.2
2.6
2.0
2.4
2.2
2.2
3.4
3.5
2.0
3.2
3.3
2.5
3.0
2.5
0.7
2.5
2.5
2.5
2.5
4.5
4.5
3.0
3.0
4.5
2.1
3.2
1.5
1.5
1.5
2.5
3.0
3.0
2.0
3.0
2.3
3.0
0.4
4.1
2.3
2.3
2.3
2.3
2.3
2.3
2.3
2.5
2.9
2.5
2.3
2.3
2.3
2.5
2.3
2.2
3.0
2.3
2.0
3.0
2.6
3.0
2.0
2.7
2.7
44.2
35.62
2.0
2.0
2.5
4.0
2.0
2.2
3.0
1.0
2.0
2.4
2.5
2.5
2.5
3.5
3.0
4.0
3.0
3.0
2.5
2.3
2.3
2.5
2.5
2.8
35.43
33.5
34.9
26.05
5.7
1.8
2.0
2.5
2.0
2.0
30.15
11.31
10.27
24.83
6.23
22.1
6.17
8.01
14.26
38.39
33.34
33.0
32.6
2.73
11.5
93.9
93.9
93.6
93.8
93.7
93.9
93.3
93.1
93.9
94.0
91.3
92.3
95.5
94.0
92.5
14.0
89.55
77.82
50.57
67.38
60.59
63.02
70.96
65.04
78.34
66.06
69.01
62.36
8.27
70.93
8.04
66.47
26.88
63.59
42.74
42.45
9.06
8.58
7.94
10.76
27.86
70.94
27.66
50.38
8.07
8.07
7.27
67.6
41.63
70.26
69.3
74.6
2.5
2.4
75.2
75.34
4.5
2.0
2.5
2.9
2.6
2.0
2.9
4.0
87.5
87.23
87.78
2.4
47.3
55.2
90.4
71.2
70.3
22.39
55.1
72.5
57.5
74.6
0.0
88.05
80.1
88.7
7.4
57.1
71.4
90.0
62.5
78.6
87.0
78.8
86.0
86.7
80.8
87.2
81.8
27.3
81.2
18.2
90.7
80.0
45.9
86.1
74.79
67.8
66.0
77.2
73.0
84.0
11.6
69.6
0.02
80.2
71.3
69.8
83.5
68.8
51.2
66.7
23.6
69.8
79.0
80.7
67.4
74.2
84.0
89.7
75.4
99.7
38.8
75.0
65.1
58.9
71.5
0.0
2.9
40.0
0.0
76.1
72.8
76.3
28.0
68.7
86.67
5.7
94.66
89.69
8.1
8.09
5.42
10.15
93.35
96.21
52.96
54.0
31.57
39.96
79.21
81.58
76.13
68.1
76.03
73.44
69.38
69.64
72.34
65.96
88.21
85.48
0.25
65.82
76.24
38.04
33.81
72.6
35.48
20.59
56.49
69.41
61.52
74.62
63.35
22.79
67.78
75.68
75.96
34.92
64.28
76.54
64.58
61.5
6.49
70.59
79.78
6.36
16.92
33.11
52.51
33.77
72.82
23.93
81.83
65.4
11.64
92.65
85.23
85.02
89.22
75.83
60.69
67.68
84.48
58.66
60.72
87.67
76.68
5.0
65.47
34.0
71.27
77.4
76.2
71.2
56.8
4.7
9.36
5.92
8.98
91.41
92.25
62.39
99.64
29.89
55.01
61.88
40.12
41.29
68.28
40.65
43.42
44.85
42.23
37.02
72.51
40.49
59.24
38.44
60.18
43.19
42.17
43.02
68.24
58.82
71.31
41.32
78.15
33.09
43.38
43.12
72.18
36.68
41.37
71.77
54.66
59.85
28.92
66.64
56.74
42.3
74.03
32.9
71.31
66.64
59.85
64.53
64.87
65.29
63.72
55.2
68.17
75.56
75.92
75.25
51.82
52.38
30.31
33.75
66.8
65.96
67.29
59.1
59.88
58.62
59.88
53.83
56.5
61.12
37.5
67.39
65.47
67.27
58.87
52.16
50.36
53.12
61.32
66.03
75.91
83.41
50.8
15.3
58.54
67.57
50.6
59.09
78.82
42.61
46.08
52.32
51.32
59.4
64.8
46.05
37.63
41.05
67.38
39.25
61.82
52.69
45.15
74.78
84.06
52.17
50.84
81.01
90.08
71.33
80.24
48.43
73.16
72.75
73.32
32.4
1.84
96.9
56.2
74.0
38.0
78.5
81.5
72.0
63.4
56.0
59.7
6.2
31.9
56.0
3.2
70.0
86.2
2.0
77.9
44.7
77.8
46.0
74.7
73.0
65.0
59.0
50.9
56.33
63.8
90.9
2.2
73.5
71.2
71.2
71.3
87.7
44.1
68.0
78.7
7.2
3.49
5.8
56.9
2.52
37.0
0.12
82.5
2.8
3.0
2.9
59.2
30.0
51.8
2.8
5.2
55.6
8.5
87.9
89.1
86.2
6.1
84.1
84.1
69.9
15.0
1.4
3.7
1.0
87.5
0.0
90.8
1.1
5.6
50.5
60.2
15.8
46.0
93.5
83.5
83.5
82.9
88.0
34.3
39.9
45.03
95.7
79.5
73.2
50.0
45.8
6.1
2.15
11.7
1.4
3.5
96.44
12.8
86.76
4.1
15.0
75.5
11.9
91.5
58.84
45.0
58.0
65.01
58.0
45.0
70.0
70.0
58.0
91.5
91.4
92.1
86.9
88.9
92.23
8.75
7.4
8.0
5.0
62.04
0.0
91.28
7.4
1.9
8.5
7.4
75.4
82.3
59.3
80.3
66.72
58.9
58.5
53.1
60.0
54.2
72.7
62.0
21.8
70.9
84.3
90.2
65.8
65.1
67.7
54.3
58.7
22.2
1.32
76.1
92.5
83.5
62.7
2.09
93.5
59.5
61.2
87.63
85.3
12.32
59.1
87.13
54.8
94.69
61.7
64.9
69.5
3.09
83.5
42.8
6.16
95.2
37.8
40.9
87.9
56.44
85.23
81.81
32.0
1.0
72.6
72.57
77.5
78.4
2.5
3.4
68.0
43.1
56.7
94.03
81.8
69.84
3.2
88.2
80.87
81.4
80.7
57.52
90.0
2.0
76.7
83.1
1.3
5.0
2.8
81.6
59.6
14.5
49.9
21.7
0.0
23.9
55.5
9.0
4.2
84.4
53.0
54.66
28.24
6.8
10.4
6.84
8.2
81.9
43.0
70.25
26.0
79.2
78.5
data.drop_duplicates(keep="first", inplace=False)
0       15.87
2        0.24
3       42.41
4       41.11
5       48.42...  
8598    21.70
8600    23.90
8607    28.24
8610     6.84
8613    43.00
Name: Water_(g), Length: 4180, dtype: float64

2.显示信息

  • .head()默认显示前5行,也可以在里面加参数,显示自己要显示的行数
  • .tail()显示末尾几行
  • .columns这个参数显示列名
  • .shape
# 显示前三条数据。不加默认显示5行
first_rows = food_info.head(3)
print("显示后三行:\n", first_rows)  # 打印前三行
# 显示末尾几行
print("类型", type(first_rows))
print("显示后三行:\n", food_info.tail(3))
print("columns:", food_info.columns)  # 显示列名
print("shape:", food_info.shape)
显示后三行:NDB_No                 Shrt_Desc  Water_(g)  Energ_Kcal  Protein_(g)  \
0    1001          BUTTER WITH SALT      15.87         717         0.85   
1    1002  BUTTER WHIPPED WITH SALT      15.87         717         0.85   
2    1003      BUTTER OIL ANHYDROUS       0.24         876         0.28   Lipid_Tot_(g)  Ash_(g)  Carbohydrt_(g)  Fiber_TD_(g)  Sugar_Tot_(g)  ...  \
0          81.11     2.11            0.06           0.0           0.06  ...   
1          81.11     2.11            0.06           0.0           0.06  ...   
2          99.48     0.00            0.00           0.0           0.00  ...   Vit_A_IU  Vit_A_RAE  Vit_E_(mg)  Vit_D_mcg  Vit_D_IU  Vit_K_(mcg)  \
0    2499.0      684.0        2.32        1.5      60.0          7.0   
1    2499.0      684.0        2.32        1.5      60.0          7.0   
2    3069.0      840.0        2.80        1.8      73.0          8.6   FA_Sat_(g)  FA_Mono_(g)  FA_Poly_(g)  Cholestrl_(mg)  
0      51.368       21.021        3.043           215.0  
1      50.489       23.426        3.012           219.0  
2      61.924       28.732        3.694           256.0  [3 rows x 36 columns]
类型 <class 'pandas.core.frame.DataFrame'>
显示后三行:NDB_No         Shrt_Desc  Water_(g)  Energ_Kcal  Protein_(g)  \
8615   90480        SYRUP CANE       26.0         269          0.0   
8616   90560         SNAIL RAW       79.2          90         16.1   
8617   93600  TURTLE GREEN RAW       78.5          89         19.8   Lipid_Tot_(g)  Ash_(g)  Carbohydrt_(g)  Fiber_TD_(g)  Sugar_Tot_(g)  \
8615            0.0     0.86           73.14           0.0           73.2   
8616            1.4     1.30            2.00           0.0            0.0   
8617            0.5     1.20            0.00           0.0            0.0   ...  Vit_A_IU  Vit_A_RAE  Vit_E_(mg)  Vit_D_mcg  Vit_D_IU  Vit_K_(mcg)  \
8615  ...       0.0        0.0         0.0        0.0       0.0          0.0   
8616  ...     100.0       30.0         5.0        0.0       0.0          0.1   
8617  ...     100.0       30.0         0.5        0.0       0.0          0.1   FA_Sat_(g)  FA_Mono_(g)  FA_Poly_(g)  Cholestrl_(mg)  
8615       0.000        0.000        0.000             0.0  
8616       0.361        0.259        0.252            50.0  
8617       0.127        0.088        0.170            50.0  [3 rows x 36 columns]
columns: Index(['NDB_No', 'Shrt_Desc', 'Water_(g)', 'Energ_Kcal', 'Protein_(g)','Lipid_Tot_(g)', 'Ash_(g)', 'Carbohydrt_(g)', 'Fiber_TD_(g)','Sugar_Tot_(g)', 'Calcium_(mg)', 'Iron_(mg)', 'Magnesium_(mg)','Phosphorus_(mg)', 'Potassium_(mg)', 'Sodium_(mg)', 'Zinc_(mg)','Copper_(mg)', 'Manganese_(mg)', 'Selenium_(mcg)', 'Vit_C_(mg)','Thiamin_(mg)', 'Riboflavin_(mg)', 'Niacin_(mg)', 'Vit_B6_(mg)','Vit_B12_(mcg)', 'Vit_A_IU', 'Vit_A_RAE', 'Vit_E_(mg)', 'Vit_D_mcg','Vit_D_IU', 'Vit_K_(mcg)', 'FA_Sat_(g)', 'FA_Mono_(g)', 'FA_Poly_(g)','Cholestrl_(mg)'],dtype='object')
shape: (8618, 36)

3.获取数据

  • 单行数据:通过loc[m]得到第m行的数据
  • 多行数据:通过loc[[m:n]]得到第m:n列的数据
  • 单列数据:通过列名属性得到 food_info[“NDB_No”]
  • 多列数据:传入列表:
# pandas uses zero-indexing
# Series object representing the row at index 0.
print(food_info.loc[0])  # 获取数据
# Series object representing the seventh row.
food_info.loc[6]
# Will throw an error: "KeyError: 'the label [8620] is not in the [index]'"
# food_info.loc[8620]
NDB_No                         1001
Shrt_Desc          BUTTER WITH SALT
Water_(g)                     15.87
Energ_Kcal                      717
Protein_(g)                    0.85
Lipid_Tot_(g)                 81.11
Ash_(g)                        2.11
Carbohydrt_(g)                 0.06
Fiber_TD_(g)                    0.0
Sugar_Tot_(g)                  0.06
Calcium_(mg)                   24.0
Iron_(mg)                      0.02
Magnesium_(mg)                  2.0
Phosphorus_(mg)                24.0
Potassium_(mg)                 24.0
Sodium_(mg)                   643.0
Zinc_(mg)                      0.09
Copper_(mg)                     0.0
Manganese_(mg)                  0.0
Selenium_(mcg)                  1.0
Vit_C_(mg)                      0.0
Thiamin_(mg)                  0.005
Riboflavin_(mg)               0.034
Niacin_(mg)                   0.042
Vit_B6_(mg)                   0.003
Vit_B12_(mcg)                  0.17
Vit_A_IU                     2499.0
Vit_A_RAE                     684.0
Vit_E_(mg)                     2.32
Vit_D_mcg                       1.5
Vit_D_IU                       60.0
Vit_K_(mcg)                     7.0
FA_Sat_(g)                   51.368
FA_Mono_(g)                  21.021
FA_Poly_(g)                   3.043
Cholestrl_(mg)                215.0
Name: 0, dtype: objectNDB_No                         1007
Shrt_Desc          CHEESE CAMEMBERT
Water_(g)                      51.8
Energ_Kcal                      300
Protein_(g)                    19.8
Lipid_Tot_(g)                 24.26
Ash_(g)                        3.68
Carbohydrt_(g)                 0.46
Fiber_TD_(g)                    0.0
Sugar_Tot_(g)                  0.46
Calcium_(mg)                  388.0
Iron_(mg)                      0.33
Magnesium_(mg)                 20.0
Phosphorus_(mg)               347.0
Potassium_(mg)                187.0
Sodium_(mg)                   842.0
Zinc_(mg)                      2.38
Copper_(mg)                   0.021
Manganese_(mg)                0.038
Selenium_(mcg)                 14.5
Vit_C_(mg)                      0.0
Thiamin_(mg)                  0.028
Riboflavin_(mg)               0.488
Niacin_(mg)                    0.63
Vit_B6_(mg)                   0.227
Vit_B12_(mcg)                   1.3
Vit_A_IU                      820.0
Vit_A_RAE                     241.0
Vit_E_(mg)                     0.21
Vit_D_mcg                       0.4
Vit_D_IU                       18.0
Vit_K_(mcg)                     2.0
FA_Sat_(g)                   15.259
FA_Mono_(g)                   7.023
FA_Poly_(g)                   0.724
Cholestrl_(mg)                 72.0
Name: 6, dtype: object
# object - For string values
# int - For integer values
# float - For float values
# datetime - For time values
# bool - For Boolean values
# print(food_info.dtypes)
# Returns a DataFrame containing the rows at indexes 3, 4, 5, and 6.
print("loc_3_6:\n", food_info.loc[3:6])  # 切片取数据
# Returns a DataFrame containing the rows at indexes 2, 5, and 10. Either of the following approaches will work.
# Method 1
two_five_ten = [2,5,10]
print("loc_3_6_1:\n", food_info.loc[two_five_ten])# Method 2
print("loc_3_6_2:\n", food_info.loc[[2, 5, 10]])
loc_3_6:NDB_No         Shrt_Desc  Water_(g)  Energ_Kcal  Protein_(g)  \
3    1004       CHEESE BLUE      42.41         353        21.40   
4    1005      CHEESE BRICK      41.11         371        23.24   
5    1006       CHEESE BRIE      48.42         334        20.75   
6    1007  CHEESE CAMEMBERT      51.80         300        19.80   Lipid_Tot_(g)  Ash_(g)  Carbohydrt_(g)  Fiber_TD_(g)  Sugar_Tot_(g)  ...  \
3          28.74     5.11            2.34           0.0           0.50  ...   
4          29.68     3.18            2.79           0.0           0.51  ...   
5          27.68     2.70            0.45           0.0           0.45  ...   
6          24.26     3.68            0.46           0.0           0.46  ...   Vit_A_IU  Vit_A_RAE  Vit_E_(mg)  Vit_D_mcg  Vit_D_IU  Vit_K_(mcg)  \
3     721.0      198.0        0.25        0.5      21.0          2.4   
4    1080.0      292.0        0.26        0.5      22.0          2.5   
5     592.0      174.0        0.24        0.5      20.0          2.3   
6     820.0      241.0        0.21        0.4      18.0          2.0   FA_Sat_(g)  FA_Mono_(g)  FA_Poly_(g)  Cholestrl_(mg)  
3      18.669        7.778        0.800            75.0  
4      18.764        8.598        0.784            94.0  
5      17.410        8.013        0.826           100.0  
6      15.259        7.023        0.724            72.0  [4 rows x 36 columns]
loc_3_6_1:NDB_No             Shrt_Desc  Water_(g)  Energ_Kcal  Protein_(g)  \
2     1003  BUTTER OIL ANHYDROUS       0.24         876         0.28   
5     1006           CHEESE BRIE      48.42         334        20.75   
10    1011          CHEESE COLBY      38.20         394        23.76   Lipid_Tot_(g)  Ash_(g)  Carbohydrt_(g)  Fiber_TD_(g)  Sugar_Tot_(g)  ...  \
2           99.48     0.00            0.00           0.0           0.00  ...   
5           27.68     2.70            0.45           0.0           0.45  ...   
10          32.11     3.36            2.57           0.0           0.52  ...   Vit_A_IU  Vit_A_RAE  Vit_E_(mg)  Vit_D_mcg  Vit_D_IU  Vit_K_(mcg)  \
2     3069.0      840.0        2.80        1.8      73.0          8.6   
5      592.0      174.0        0.24        0.5      20.0          2.3   
10     994.0      264.0        0.28        0.6      24.0          2.7   FA_Sat_(g)  FA_Mono_(g)  FA_Poly_(g)  Cholestrl_(mg)  
2       61.924       28.732        3.694           256.0  
5       17.410        8.013        0.826           100.0  
10      20.218        9.280        0.953            95.0  [3 rows x 36 columns]
loc_3_6_2:NDB_No             Shrt_Desc  Water_(g)  Energ_Kcal  Protein_(g)  \
2     1003  BUTTER OIL ANHYDROUS       0.24         876         0.28   
5     1006           CHEESE BRIE      48.42         334        20.75   
10    1011          CHEESE COLBY      38.20         394        23.76   Lipid_Tot_(g)  Ash_(g)  Carbohydrt_(g)  Fiber_TD_(g)  Sugar_Tot_(g)  ...  \
2           99.48     0.00            0.00           0.0           0.00  ...   
5           27.68     2.70            0.45           0.0           0.45  ...   
10          32.11     3.36            2.57           0.0           0.52  ...   Vit_A_IU  Vit_A_RAE  Vit_E_(mg)  Vit_D_mcg  Vit_D_IU  Vit_K_(mcg)  \
2     3069.0      840.0        2.80        1.8      73.0          8.6   
5      592.0      174.0        0.24        0.5      20.0          2.3   
10     994.0      264.0        0.28        0.6      24.0          2.7   FA_Sat_(g)  FA_Mono_(g)  FA_Poly_(g)  Cholestrl_(mg)  
2       61.924       28.732        3.694           256.0  
5       17.410        8.013        0.826           100.0  
10      20.218        9.280        0.953            95.0  [3 rows x 36 columns]
# Series object representing the "NDB_No" column.
ndb_col = food_info["NDB_No"]  # 输入列名,得到这一列的数据
print("ndb_col:\n", ndb_col)
# Alternatively, you can access a column by passing in a string variable.
col_name = "NDB_No"
ndb_col = food_info[col_name]
print("ndb_col_v2:\n", ndb_col)
ndb_col:0        1001
1        1002
2        1003
3        1004
4        1005...  
8613    83110
8614    90240
8615    90480
8616    90560
8617    93600
Name: NDB_No, Length: 8618, dtype: int64
ndb_col_v2:0        1001
1        1002
2        1003
3        1004
4        1005...  
8613    83110
8614    90240
8615    90480
8616    90560
8617    93600
Name: NDB_No, Length: 8618, dtype: int64
# 得到两列
columns = ["Zinc_(mg)", "Copper_(mg)"]  
zinc_copper = food_info[columns]
print("zinc_copper:\n", zinc_copper)
# print zinc_copper
# Skipping the assignment.
zinc_copper = food_info[["Zinc_(mg)", "Copper_(mg)"]]
print("zinc_copper_v2:\n", zinc_copper)
zinc_copper:Zinc_(mg)  Copper_(mg)
0          0.09        0.000
1          0.05        0.016
2          0.01        0.001
3          2.66        0.040
4          2.60        0.024
...         ...          ...
8613       1.10        0.100
8614       1.55        0.033
8615       0.19        0.020
8616       1.00        0.400
8617       1.00        0.250[8618 rows x 2 columns]
zinc_copper_v2:Zinc_(mg)  Copper_(mg)
0          0.09        0.000
1          0.05        0.016
2          0.01        0.001
3          2.66        0.040
4          2.60        0.024
...         ...          ...
8613       1.10        0.100
8614       1.55        0.033
8615       0.19        0.020
8616       1.00        0.400
8617       1.00        0.250[8618 rows x 2 columns]

二、实践一

  • .tolist()得到列名
  • c.endwith(‘’)是否以…结尾
# print(food_info.columns)
# print(food_info.head(2))
col_names = food_info.columns.tolist()  # 得到列名
print("col_names:\n", col_names)
gram_columns = []  # 定义一个列表
for c in col_names:if c.endswith("(g)"):  # 以g结尾gram_columns.append(c)  # 添加元素
gram_df = food_info[gram_columns]
print("head:\n", gram_df.head(3))
col_names:['NDB_No', 'Shrt_Desc', 'Water_(g)', 'Energ_Kcal', 'Protein_(g)', 'Lipid_Tot_(g)', 'Ash_(g)', 'Carbohydrt_(g)', 'Fiber_TD_(g)', 'Sugar_Tot_(g)', 'Calcium_(mg)', 'Iron_(mg)', 'Magnesium_(mg)', 'Phosphorus_(mg)', 'Potassium_(mg)', 'Sodium_(mg)', 'Zinc_(mg)', 'Copper_(mg)', 'Manganese_(mg)', 'Selenium_(mcg)', 'Vit_C_(mg)', 'Thiamin_(mg)', 'Riboflavin_(mg)', 'Niacin_(mg)', 'Vit_B6_(mg)', 'Vit_B12_(mcg)', 'Vit_A_IU', 'Vit_A_RAE', 'Vit_E_(mg)', 'Vit_D_mcg', 'Vit_D_IU', 'Vit_K_(mcg)', 'FA_Sat_(g)', 'FA_Mono_(g)', 'FA_Poly_(g)', 'Cholestrl_(mg)']
head:Water_(g)  Protein_(g)  Lipid_Tot_(g)  Ash_(g)  Carbohydrt_(g)  \
0      15.87         0.85          81.11     2.11            0.06   
1      15.87         0.85          81.11     2.11            0.06   
2       0.24         0.28          99.48     0.00            0.00   Fiber_TD_(g)  Sugar_Tot_(g)  FA_Sat_(g)  FA_Mono_(g)  FA_Poly_(g)  
0           0.0           0.06      51.368       21.021        3.043  
1           0.0           0.06      50.489       23.426        3.012  
2           0.0           0.00      61.924       28.732        3.694  
import pandas
food_info = pandas.read_csv("../../data/food_info.csv")
col_names = food_info.columns.tolist()
print(col_names)
print(food_info.head(3))
['NDB_No', 'Shrt_Desc', 'Water_(g)', 'Energ_Kcal', 'Protein_(g)', 'Lipid_Tot_(g)', 'Ash_(g)', 'Carbohydrt_(g)', 'Fiber_TD_(g)', 'Sugar_Tot_(g)', 'Calcium_(mg)', 'Iron_(mg)', 'Magnesium_(mg)', 'Phosphorus_(mg)', 'Potassium_(mg)', 'Sodium_(mg)', 'Zinc_(mg)', 'Copper_(mg)', 'Manganese_(mg)', 'Selenium_(mcg)', 'Vit_C_(mg)', 'Thiamin_(mg)', 'Riboflavin_(mg)', 'Niacin_(mg)', 'Vit_B6_(mg)', 'Vit_B12_(mcg)', 'Vit_A_IU', 'Vit_A_RAE', 'Vit_E_(mg)', 'Vit_D_mcg', 'Vit_D_IU', 'Vit_K_(mcg)', 'FA_Sat_(g)', 'FA_Mono_(g)', 'FA_Poly_(g)', 'Cholestrl_(mg)']NDB_No                 Shrt_Desc  Water_(g)  Energ_Kcal  Protein_(g)  \
0    1001          BUTTER WITH SALT      15.87         717         0.85   
1    1002  BUTTER WHIPPED WITH SALT      15.87         717         0.85   
2    1003      BUTTER OIL ANHYDROUS       0.24         876         0.28   Lipid_Tot_(g)  Ash_(g)  Carbohydrt_(g)  Fiber_TD_(g)  Sugar_Tot_(g)  ...  \
0          81.11     2.11            0.06           0.0           0.06  ...   
1          81.11     2.11            0.06           0.0           0.06  ...   
2          99.48     0.00            0.00           0.0           0.00  ...   Vit_A_IU  Vit_A_RAE  Vit_E_(mg)  Vit_D_mcg  Vit_D_IU  Vit_K_(mcg)  \
0    2499.0      684.0        2.32        1.5      60.0          7.0   
1    2499.0      684.0        2.32        1.5      60.0          7.0   
2    3069.0      840.0        2.80        1.8      73.0          8.6   FA_Sat_(g)  FA_Mono_(g)  FA_Poly_(g)  Cholestrl_(mg)  
0      51.368       21.021        3.043           215.0  
1      50.489       23.426        3.012           219.0  
2      61.924       28.732        3.694           256.0  [3 rows x 36 columns]

2.1 操作

  1. 可以进行加减乘除操作
    * 简单的和常数作运算可以,和另外的列做运算也可以
  2. 也可以添加列
print (food_info["Iron_(mg)"])
div_1000 = food_info["Iron_(mg)"] / 1000
print ("div_1000:\n", div_1000)
# Adds 100 to each value in the column and returns a Series object.
add_100 = food_info["Iron_(mg)"] + 100
print ("add_100:\n", add_100)# Subtracts 100 from each value in the column and returns a Series object.
sub_100 = food_info["Iron_(mg)"] - 100
print ("sub_100:\n",sub_100)# Multiplies each value in the column by 2 and returns a Series object.
mult_2 = food_info["Iron_(mg)"]*2
print ("mult_2:\n",mult_2)
0       0.02
1       0.16
2       0.00
3       0.31
4       0.43... 
8613    1.40
8614    0.58
8615    3.60
8616    3.50
8617    1.40
Name: Iron_(mg), Length: 8618, dtype: float64
div_1000:0       0.00002
1       0.00016
2       0.00000
3       0.00031
4       0.00043...   
8613    0.00140
8614    0.00058
8615    0.00360
8616    0.00350
8617    0.00140
Name: Iron_(mg), Length: 8618, dtype: float64
add_100:0       100.02
1       100.16
2       100.00
3       100.31
4       100.43...  
8613    101.40
8614    100.58
8615    103.60
8616    103.50
8617    101.40
Name: Iron_(mg), Length: 8618, dtype: float64
sub_100:0       -99.98
1       -99.84
2      -100.00
3       -99.69
4       -99.57...  
8613    -98.60
8614    -99.42
8615    -96.40
8616    -96.50
8617    -98.60
Name: Iron_(mg), Length: 8618, dtype: float64
mult_2:0       0.04
1       0.32
2       0.00
3       0.62
4       0.86... 
8613    2.80
8614    1.16
8615    7.20
8616    7.00
8617    2.80
Name: Iron_(mg), Length: 8618, dtype: float64
# It applies the arithmetic operator to the first value in both columns, the second value in both columns, and so onwater_energy = food_info["Water_(g)"] * food_info["Energ_Kcal"]
water_energy = food_info["Water_(g)"] * food_info["Energ_Kcal"]
iron_grams = food_info["Iron_(mg)"] / 1000  # 
print (food_info.shape)
food_info["Iron_(g)"] = iron_grams  # 新建一个列名,并对其赋值
print (food_info.shape)
(8618, 36)
(8618, 37)
#Score=2×(Protein_(g))−0.75×(Lipid_Tot_(g))
weighted_protein = food_info["Protein_(g)"] * 2
weighted_fat = -0.75 * food_info["Lipid_Tot_(g)"]
initial_rating = weighted_protein + weighted_fat

2.2 某一列的最值

  • 先获得这一列的数据,最后获得最值
    max最大值,min最小值
# the "Vit_A_IU" column ranges from 0 to 100000, while the "Fiber_TD_(g)" column ranges from 0 to 79
#For certain calculations, columns like "Vit_A_IU" can have a greater effect on the result, 
#due to the scale of the values
# The largest value in the "Energ_Kcal" column.
max_calories = food_info["Energ_Kcal"].min()
print(max_calories)
# Divide the values in "Energ_Kcal" by the largest value.
normalized_calories = food_info["Energ_Kcal"] / max_calories
normalized_protein = food_info["Protein_(g)"] / food_info["Protein_(g)"].max()
normalized_fat = food_info["Lipid_Tot_(g)"] / food_info["Lipid_Tot_(g)"].max()
food_info["Normalized_Protein"] = normalized_protein
food_info["Normalized_Fat"] = normalized_fat
print(food_info.shape)
0
(8618, 39)

2.3 排序

  • 对某一列的数据进行排序,函数sort_values(‘列名’,inplace=True) 包括从大到小,从小到大
#By default, pandas will sort the data by the column we specify in ascending order and return a new DataFrame
# Sorts the DataFrame in-place, rather than=true returning a new DataFrame.
#print food_info["Sodium_(mg)"]
food_info.sort_values("Sodium_(mg)", inplace=True) # 指定列进行从小到大排序
print (food_info["Sodium_(mg)"])
#Sorts by descending order, rather than ascending.
food_info.sort_values("Sodium_(mg)", inplace=True, ascending=False) # 降序
print (food_info["Sodium_(mg)"])
760     0.0
758     0.0
405     0.0
761     0.0
2269    0.0... 
8184    NaN
8185    NaN
8195    NaN
8251    NaN
8267    NaN
Name: Sodium_(mg), Length: 8618, dtype: float64
276     38758.0
5814    27360.0
6192    26050.0
1242    26000.0
1245    24000.0...   
8184        NaN
8185        NaN
8195        NaN
8251        NaN
8267        NaN
Name: Sodium_(mg), Length: 8618, dtype: float64

三、实践二:泰坦尼克船员获救案例

Surivived为标签
pclass为所居住的环境,一等舱
SibSp 兄弟姐妹的数量
Parch 登船后老人和孩子的数量
ticket:船票编码
Fare:船票价格
Cabin:船舱的序号,NaN表示缺失值
Embarked:登船地点
import pandas as pd
import numpy as np
titanic_survival = pd.read_csv("../../data/titanic_train.csv")
titanic_survival.head(3)
PassengerIdSurvivedPclassNameSexAgeSibSpParchTicketFareCabinEmbarked
0103Braund, Mr. Owen Harrismale22.010A/5 211717.2500NaNS
1211Cumings, Mrs. John Bradley (Florence Briggs Th...female38.010PC 1759971.2833C85C
2313Heikkinen, Miss. Lainafemale26.000STON/O2. 31012827.9250NaNS

3.1 相关函数整理

  • pandas.isnull(age):判断一组数据是否是缺失值
    这里有一点有注意,python中可以用‘是/否’作为索引,从而得到相应的数据
  • len()这个是个通用的函数,并非类中的函数,所以是传参形的
age = titanic_survival["Age"]
print(age.loc[0:10])               # 年龄前10个数据
# 缺失值处理
age_is_null = pd.isnull(age)        # 判断一组数据是否是缺失值
print (age_is_null)age_null_true = age[age_is_null]  
print (age_null_true)             # 打印处年龄是缺失值的值
age_null_count = len(age_null_true) # 打印年龄是缺失值的函数的个数
print(age_null_count)
0     22.0
1     38.0
2     26.0
3     35.0
4     35.0
5      NaN
6     54.0
7      2.0
8     27.0
9     14.0
10     4.0
Name: Age, dtype: float64
0      False
1      False
2      False
3      False
4      False...  
886    False
887    False
888     True
889    False
890    False
Name: Age, Length: 891, dtype: bool
5     NaN
17    NaN
19    NaN
26    NaN
28    NaN..
859   NaN
863   NaN
868   NaN
878   NaN
888   NaN
Name: Age, Length: 177, dtype: float64
177

注意:统计数据中,如果数据中有一个是缺失,怎会造成所有数据呈现缺失的结果

mean_age = sum(titanic_survival["Age"]) / len(titanic_survival["Age"])  # 平均年龄
print (mean_age)
nan

3.2 除去缺失数据的方法

  • 自己判断
    • tinanic_surival[‘Age’][age_is_null==False],后面的这个就是加上的判断
  • 自带函数
    • 求平均的可以用.mean()
#we have to filter out the missing values before we calculate the mean.
good_ages = titanic_survival["Age"][age_is_null == False]
#print good_ages
correct_mean_age = sum(good_ages) / len(good_ages)
print (correct_mean_age)
29.69911764705882
# missing data is so common that many pandas methods automatically filter for it
# 线程的
correct_mean_age = titanic_survival["Age"].mean()
print (correct_mean_age)
29.69911764705882
#mean fare for each class
# 分别求不同船舱的平均价格
passenger_classes = [1, 2, 3]
fares_by_class = {}                        # 定义一个字典
for this_class in passenger_classes:pclass_rows = titanic_survival[titanic_survival["Pclass"] == this_class]pclass_fares = pclass_rows["Fare"]     # 定位到价格fare_for_class = pclass_fares.mean()fares_by_class[this_class] = fare_for_classprint (fares_by_class)
{1: 84.1546875, 2: 20.662183152173913, 3: 13.675550101832993}
#index tells the method which column to group by
#values is the column that we want to apply the calculation to
#aggfunc specifies the calculation we want to perform
# index:以这个为基准
# valuses:统计index与这个值的关系
passenger_survival = titanic_survival.pivot_table(index="Pclass", values="Survived", aggfunc=np.mean)
print (passenger_survival)
        Survived
Pclass          
1       0.629630
2       0.472826
3       0.242363
# 不指定function的话默认安装求均值
passenger_age = titanic_survival.pivot_table(index="Pclass", values="Age")
print(passenger_age)
              Age
Pclass           
1       38.233441
2       29.877630
3       25.140620
  • 一个量与两个量的关系
port_stats = titanic_survival.pivot_table(index="Embarked", values=["Fare","Survived"], aggfunc=np.sum)
print(port_stats)
                Fare  Survived
Embarked                      
C         10072.2962        93
Q          1022.2543        30
S         17439.3988       217
# specifying axis=1 or axis='columns' will drop any columns that have null values
drop_na_columns = titanic_survival.dropna(axis=1)  # axis是维度
# 如果再Age和Sex之间有缺失值,就会把数据丢掉
new_titanic_survival = titanic_survival.dropna(axis=0,subset=["Age", "Sex"])
print(new_titanic_survival.head(2))
   PassengerId  Survived  Pclass  \
0            1         0       3   
1            2         1       1   Name     Sex   Age  SibSp  \
0                            Braund, Mr. Owen Harris    male  22.0      1   
1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0      1   Parch     Ticket     Fare Cabin Embarked  
0      0  A/5 21171   7.2500   NaN        S  
1      0   PC 17599  71.2833   C85        C  
# 定位到具体的样本
row_index_83_age = titanic_survival.loc[83,"Age"]
row_index_1000_pclass = titanic_survival.loc[766,"Pclass"]
print (row_index_83_age)
print (row_index_1000_pclass)
28.0
1
new_titanic_survival = titanic_survival.sort_values("Age",ascending=False) # 降序
print (new_titanic_survival[0:10])# index也会自动排序
titanic_reindexed = new_titanic_survival.reset_index(drop=True)
print('-------------')
print(titanic_reindexed.loc[0:10])
     PassengerId  Survived  Pclass                                  Name  \
630          631         1       1  Barkworth, Mr. Algernon Henry Wilson   
851          852         0       3                   Svensson, Mr. Johan   
493          494         0       1               Artagaveytia, Mr. Ramon   
96            97         0       1             Goldschmidt, Mr. George B   
116          117         0       3                  Connors, Mr. Patrick   
672          673         0       2           Mitchell, Mr. Henry Michael   
745          746         0       1          Crosby, Capt. Edward Gifford   
33            34         0       2                 Wheadon, Mr. Edward H   
54            55         0       1        Ostby, Mr. Engelhart Cornelius   
280          281         0       3                      Duane, Mr. Frank   Sex   Age  SibSp  Parch      Ticket     Fare Cabin Embarked  
630  male  80.0      0      0       27042  30.0000   A23        S  
851  male  74.0      0      0      347060   7.7750   NaN        S  
493  male  71.0      0      0    PC 17609  49.5042   NaN        C  
96   male  71.0      0      0    PC 17754  34.6542    A5        C  
116  male  70.5      0      0      370369   7.7500   NaN        Q  
672  male  70.0      0      0  C.A. 24580  10.5000   NaN        S  
745  male  70.0      1      1   WE/P 5735  71.0000   B22        S  
33   male  66.0      0      0  C.A. 24579  10.5000   NaN        S  
54   male  65.0      0      1      113509  61.9792   B30        C  
280  male  65.0      0      0      336439   7.7500   NaN        Q  
-------------PassengerId  Survived  Pclass                                  Name   Sex  \
0           631         1       1  Barkworth, Mr. Algernon Henry Wilson  male   
1           852         0       3                   Svensson, Mr. Johan  male   
2           494         0       1               Artagaveytia, Mr. Ramon  male   
3            97         0       1             Goldschmidt, Mr. George B  male   
4           117         0       3                  Connors, Mr. Patrick  male   
5           673         0       2           Mitchell, Mr. Henry Michael  male   
6           746         0       1          Crosby, Capt. Edward Gifford  male   
7            34         0       2                 Wheadon, Mr. Edward H  male   
8            55         0       1        Ostby, Mr. Engelhart Cornelius  male   
9           281         0       3                      Duane, Mr. Frank  male   
10          457         0       1             Millet, Mr. Francis Davis  male   Age  SibSp  Parch      Ticket     Fare Cabin Embarked  
0   80.0      0      0       27042  30.0000   A23        S  
1   74.0      0      0      347060   7.7750   NaN        S  
2   71.0      0      0    PC 17609  49.5042   NaN        C  
3   71.0      0      0    PC 17754  34.6542    A5        C  
4   70.5      0      0      370369   7.7500   NaN        Q  
5   70.0      0      0  C.A. 24580  10.5000   NaN        S  
6   70.0      1      1   WE/P 5735  71.0000   B22        S  
7   66.0      0      0  C.A. 24579  10.5000   NaN        S  
8   65.0      0      1      113509  61.9792   B30        C  
9   65.0      0      0      336439   7.7500   NaN        Q  
10  65.0      0      0       13509  26.5500   E38        S  

3.3 函数操作

  • 自定义apply函数
# This function returns the hundredth item from a seriesdef hundredth_row(column):# Extract the hundredth itemhundredth_item = column.loc[99]return hundredth_item# Return the hundredth item from each column
hundredth_row = titanic_survival.apply(hundredth_row)
print (hundredth_row)
PassengerId                  100
Survived                       0
Pclass                         2
Name           Kantor, Mr. Sinai
Sex                         male
Age                         34.0
SibSp                          1
Parch                          0
Ticket                    244367
Fare                        26.0
Cabin                        NaN
Embarked                       S
dtype: object
# 每一列缺失值的个数
def not_null_count(column):column_null = pd.isnull(column)null = column[column_null]return len(null)column_null_count = titanic_survival.apply(not_null_count)
print (column_null_count)
PassengerId      0
Survived         0
Pclass           0
Name             0
Sex              0
Age            177
SibSp            0
Parch            0
Ticket           0
Fare             0
Cabin          687
Embarked         2
dtype: int64
#By passing in the axis=1 argument, we can use the DataFrame.apply() method to iterate over rows instead of columns.
# 数据转换
def which_class(row):pclass = row['Pclass']if pd.isnull(pclass):return "Unknown"elif pclass == 1:return "First Class"elif pclass == 2:return "Second Class"elif pclass == 3:return "Third Class"classes = titanic_survival.apply(which_class, axis=1)
print (classes)
0       Third Class
1       First Class
2       Third Class
3       First Class
4       Third Class...     
886    Second Class
887     First Class
888     Third Class
889     First Class
890     Third Class
Length: 891, dtype: object
# 年龄
def is_minor(row):if row["Age"] < 18:return Trueelse:return Falseminors = titanic_survival.apply(is_minor, axis=1)
print(minors)def generate_age_label(row):age = row["Age"]if pd.isnull(age):return "unknown"elif age < 18:return "minor"else:return "adult"age_labels = titanic_survival.apply(generate_age_label, axis=1)
print (age_labels)
0      False
1      False
2      False
3      False
4      False...  
886    False
887    False
888    False
889    False
890    False
Length: 891, dtype: bool
0        adult
1        adult
2        adult
3        adult
4        adult...   
886      adult
887      adult
888    unknown
889      adult
890      adult
Length: 891, dtype: object
titanic_survival['age_labels'] = age_labels
age_group_survival = titanic_survival.pivot_table(index="age_labels", values="Survived")
print (age_group_survival)
            Survived
age_labels          
adult       0.381032
minor       0.539823
unknown     0.293785

四、DataFrame结构

DataFrame结构是读取进来的矩阵,Series是矩阵的一行或者一列,Series里面的结构是ndarray

import pandas as pd
fandango = pd.read_csv('./../../data/fandango_score_comparison.csv')
series_film = fandango['FILM']  # 这是一个Series结构的
print (type(series_film))
print(series_film[0:5])
series_rt = fandango['RottenTomatoes']
print (series_rt[0:5])
<class 'pandas.core.series.Series'>
0    Avengers: Age of Ultron (2015)
1                 Cinderella (2015)
2                    Ant-Man (2015)
3            Do You Believe? (2015)
4     Hot Tub Time Machine 2 (2015)
Name: FILM, dtype: object
0    74
1    85
2    80
3    18
4    14
Name: RottenTomatoes, dtype: int64

新建Series结构

# Import the Series object from pandas
from pandas import Seriesfilm_names = series_film.values
print (type(film_names))
print ("film_names:\n", film_names)
rt_scores = series_rt.values
print (rt_scores)
<class 'numpy.ndarray'>
film_names:['Avengers: Age of Ultron (2015)' 'Cinderella (2015)' 'Ant-Man (2015)''Do You Believe? (2015)' 'Hot Tub Time Machine 2 (2015)''The Water Diviner (2015)' 'Irrational Man (2015)' 'Top Five (2014)''Shaun the Sheep Movie (2015)' 'Love & Mercy (2015)''Far From The Madding Crowd (2015)' 'Black Sea (2015)' 'Leviathan (2014)''Unbroken (2014)' 'The Imitation Game (2014)' 'Taken 3 (2015)''Ted 2 (2015)' 'Southpaw (2015)''Night at the Museum: Secret of the Tomb (2014)' 'Pixels (2015)''McFarland, USA (2015)' 'Insidious: Chapter 3 (2015)''The Man From U.N.C.L.E. (2015)' 'Run All Night (2015)''Trainwreck (2015)' 'Selma (2014)' 'Ex Machina (2015)''Still Alice (2015)' 'Wild Tales (2014)' 'The End of the Tour (2015)''Red Army (2015)' 'When Marnie Was There (2015)''The Hunting Ground (2015)' 'The Boy Next Door (2015)' 'Aloha (2015)''The Loft (2015)' '5 Flights Up (2015)' 'Welcome to Me (2015)''Saint Laurent (2015)' 'Maps to the Stars (2015)'"I'll See You In My Dreams (2015)" 'Timbuktu (2015)' 'About Elly (2015)''The Diary of a Teenage Girl (2015)''Kingsman: The Secret Service (2015)' 'Tomorrowland (2015)''The Divergent Series: Insurgent (2015)' 'Annie (2014)''Fantastic Four (2015)' 'Terminator Genisys (2015)''Pitch Perfect 2 (2015)' 'Entourage (2015)' 'The Age of Adaline (2015)''Hot Pursuit (2015)' 'The DUFF (2015)' 'Black or White (2015)''Project Almanac (2015)' 'Ricki and the Flash (2015)''Seventh Son (2015)' 'Mortdecai (2015)' 'Unfinished Business (2015)''American Ultra (2015)' 'True Story (2015)' 'Child 44 (2015)''Dark Places (2015)' 'Birdman (2014)' 'The Gift (2015)''Unfriended (2015)' 'Monkey Kingdom (2015)' 'Mr. Turner (2014)''Seymour: An Introduction (2015)' 'The Wrecking Crew (2015)''American Sniper (2015)' 'Furious 7 (2015)''The Hobbit: The Battle of the Five Armies (2014)' 'San Andreas (2015)''Straight Outta Compton (2015)' 'Vacation (2015)' 'Chappie (2015)''Poltergeist (2015)' 'Paper Towns (2015)' 'Big Eyes (2014)''Blackhat (2015)' 'Self/less (2015)' 'Sinister 2 (2015)''Little Boy (2015)' 'Me and Earl and The Dying Girl (2015)''Maggie (2015)' 'Mad Max: Fury Road (2015)' 'Spy (2015)''The SpongeBob Movie: Sponge Out of Water (2015)' 'Paddington (2015)''Dope (2015)' 'What We Do in the Shadows (2015)' 'The Overnight (2015)''The Salt of the Earth (2015)' 'Song of the Sea (2014)''Fifty Shades of Grey (2015)' 'Get Hard (2015)' 'Focus (2015)''Jupiter Ascending (2015)' 'The Gallows (2015)''The Second Best Exotic Marigold Hotel (2015)' 'Strange Magic (2015)''The Gunman (2015)' 'Hitman: Agent 47 (2015)' 'Cake (2015)''The Vatican Tapes (2015)' 'A Little Chaos (2015)''The 100-Year-Old Man Who Climbed Out the Window and Disappeared (2015)''Escobar: Paradise Lost (2015)' 'Into the Woods (2014)''It Follows (2015)' 'Inherent Vice (2014)' 'A Most Violent Year (2014)'"While We're Young (2015)" 'Clouds of Sils Maria (2015)''Testament of Youth (2015)' 'Infinitely Polar Bear (2015)''Phoenix (2015)' 'The Wolfpack (2015)''The Stanford Prison Experiment (2015)' 'Tangerine (2015)''Magic Mike XXL (2015)' 'Home (2015)' 'The Wedding Ringer (2015)''Woman in Gold (2015)' 'The Last Five Years (2015)''Mission: Impossible – Rogue Nation (2015)' 'Amy (2015)''Jurassic World (2015)' 'Minions (2015)' 'Max (2015)''Paul Blart: Mall Cop 2 (2015)' 'The Longest Ride (2015)''The Lazarus Effect (2015)' 'The Woman In Black 2 Angel of Death (2015)''Danny Collins (2015)' 'Spare Parts (2015)' 'Serena (2015)''Inside Out (2015)' 'Mr. Holmes (2015)' "'71 (2015)"'Two Days, One Night (2014)' 'Gett: The Trial of Viviane Amsalem (2015)''Kumiko, The Treasure Hunter (2015)']
[ 74  85  80  18  14  63  42  86  99  89  84  82  99  51  90   9  46  5950  17  79  59  68  60  85  99  92  88  96  92  96  89  92  10  19  1152  71  51  60  94  99  97  95  75  50  30  27   9  26  67  32  54   871  39  34  64  12  12  11  46  45  26  26  92  93  60  94  98 100  9372  81  61  50  90  27  30  31  55  72  34  20  13  20  81  54  97  9378  98  87  96  82  96  99  25  29  57  26  16  62  17  17   7  49  1340  67  52  71  96  73  90  83  89  81  80  99  84  84  95  62  45  2752  60  92  97  71  54  35   5  31  14  22  77  52  18  98  87  97  97100  87]
# int index is also aviable
# 指定key,还有一个媒体的评分值。string字符name当成索引
series_custom = Series(rt_scores , index=film_names)
series_custom[['Minions (2015)', 'Leviathan (2014)']]
fiveten = series_custom[5:10]
print(fiveten)
The Water Diviner (2015)        63
Irrational Man (2015)           42
Top Five (2014)                 86
Shaun the Sheep Movie (2015)    99
Love & Mercy (2015)             89
dtype: int64
# 很少对serise作排序original_index = series_custom.index.tolist()
print("original_index:\n", original_index)
sorted_index = sorted(original_index)
sorted_by_index = series_custom.reindex(sorted_index)
print ("sorted_by_index:\n", sorted_by_index)
original_index:['Avengers: Age of Ultron (2015)', 'Cinderella (2015)', 'Ant-Man (2015)', 'Do You Believe? (2015)', 'Hot Tub Time Machine 2 (2015)', 'The Water Diviner (2015)', 'Irrational Man (2015)', 'Top Five (2014)', 'Shaun the Sheep Movie (2015)', 'Love & Mercy (2015)', 'Far From The Madding Crowd (2015)', 'Black Sea (2015)', 'Leviathan (2014)', 'Unbroken (2014)', 'The Imitation Game (2014)', 'Taken 3 (2015)', 'Ted 2 (2015)', 'Southpaw (2015)', 'Night at the Museum: Secret of the Tomb (2014)', 'Pixels (2015)', 'McFarland, USA (2015)', 'Insidious: Chapter 3 (2015)', 'The Man From U.N.C.L.E. (2015)', 'Run All Night (2015)', 'Trainwreck (2015)', 'Selma (2014)', 'Ex Machina (2015)', 'Still Alice (2015)', 'Wild Tales (2014)', 'The End of the Tour (2015)', 'Red Army (2015)', 'When Marnie Was There (2015)', 'The Hunting Ground (2015)', 'The Boy Next Door (2015)', 'Aloha (2015)', 'The Loft (2015)', '5 Flights Up (2015)', 'Welcome to Me (2015)', 'Saint Laurent (2015)', 'Maps to the Stars (2015)', "I'll See You In My Dreams (2015)", 'Timbuktu (2015)', 'About Elly (2015)', 'The Diary of a Teenage Girl (2015)', 'Kingsman: The Secret Service (2015)', 'Tomorrowland (2015)', 'The Divergent Series: Insurgent (2015)', 'Annie (2014)', 'Fantastic Four (2015)', 'Terminator Genisys (2015)', 'Pitch Perfect 2 (2015)', 'Entourage (2015)', 'The Age of Adaline (2015)', 'Hot Pursuit (2015)', 'The DUFF (2015)', 'Black or White (2015)', 'Project Almanac (2015)', 'Ricki and the Flash (2015)', 'Seventh Son (2015)', 'Mortdecai (2015)', 'Unfinished Business (2015)', 'American Ultra (2015)', 'True Story (2015)', 'Child 44 (2015)', 'Dark Places (2015)', 'Birdman (2014)', 'The Gift (2015)', 'Unfriended (2015)', 'Monkey Kingdom (2015)', 'Mr. Turner (2014)', 'Seymour: An Introduction (2015)', 'The Wrecking Crew (2015)', 'American Sniper (2015)', 'Furious 7 (2015)', 'The Hobbit: The Battle of the Five Armies (2014)', 'San Andreas (2015)', 'Straight Outta Compton (2015)', 'Vacation (2015)', 'Chappie (2015)', 'Poltergeist (2015)', 'Paper Towns (2015)', 'Big Eyes (2014)', 'Blackhat (2015)', 'Self/less (2015)', 'Sinister 2 (2015)', 'Little Boy (2015)', 'Me and Earl and The Dying Girl (2015)', 'Maggie (2015)', 'Mad Max: Fury Road (2015)', 'Spy (2015)', 'The SpongeBob Movie: Sponge Out of Water (2015)', 'Paddington (2015)', 'Dope (2015)', 'What We Do in the Shadows (2015)', 'The Overnight (2015)', 'The Salt of the Earth (2015)', 'Song of the Sea (2014)', 'Fifty Shades of Grey (2015)', 'Get Hard (2015)', 'Focus (2015)', 'Jupiter Ascending (2015)', 'The Gallows (2015)', 'The Second Best Exotic Marigold Hotel (2015)', 'Strange Magic (2015)', 'The Gunman (2015)', 'Hitman: Agent 47 (2015)', 'Cake (2015)', 'The Vatican Tapes (2015)', 'A Little Chaos (2015)', 'The 100-Year-Old Man Who Climbed Out the Window and Disappeared (2015)', 'Escobar: Paradise Lost (2015)', 'Into the Woods (2014)', 'It Follows (2015)', 'Inherent Vice (2014)', 'A Most Violent Year (2014)', "While We're Young (2015)", 'Clouds of Sils Maria (2015)', 'Testament of Youth (2015)', 'Infinitely Polar Bear (2015)', 'Phoenix (2015)', 'The Wolfpack (2015)', 'The Stanford Prison Experiment (2015)', 'Tangerine (2015)', 'Magic Mike XXL (2015)', 'Home (2015)', 'The Wedding Ringer (2015)', 'Woman in Gold (2015)', 'The Last Five Years (2015)', 'Mission: Impossible – Rogue Nation (2015)', 'Amy (2015)', 'Jurassic World (2015)', 'Minions (2015)', 'Max (2015)', 'Paul Blart: Mall Cop 2 (2015)', 'The Longest Ride (2015)', 'The Lazarus Effect (2015)', 'The Woman In Black 2 Angel of Death (2015)', 'Danny Collins (2015)', 'Spare Parts (2015)', 'Serena (2015)', 'Inside Out (2015)', 'Mr. Holmes (2015)', "'71 (2015)", 'Two Days, One Night (2014)', 'Gett: The Trial of Viviane Amsalem (2015)', 'Kumiko, The Treasure Hunter (2015)']
sorted_by_index:'71 (2015)                          97
5 Flights Up (2015)                 52
A Little Chaos (2015)               40
A Most Violent Year (2014)          90
About Elly (2015)                   97..
What We Do in the Shadows (2015)    96
When Marnie Was There (2015)        89
While We're Young (2015)            83
Wild Tales (2014)                   96
Woman in Gold (2015)                52
Length: 146, dtype: int64
sc2 = series_custom.sort_index()  #键排序
sc3 = series_custom.sort_values() # 值排序
#print(sc2[0:10])
print(sc3[0:10])
Paul Blart: Mall Cop 2 (2015)     5
Hitman: Agent 47 (2015)           7
Hot Pursuit (2015)                8
Fantastic Four (2015)             9
Taken 3 (2015)                    9
The Boy Next Door (2015)         10
The Loft (2015)                  11
Unfinished Business (2015)       11
Mortdecai (2015)                 12
Seventh Son (2015)               12
dtype: int64
#The values in a Series object are treated as an ndarray, the core data type in NumPy
import numpy as np
# Add each value with each other
print (np.add(series_custom, series_custom))
# Apply sine function to each value
np.sin(series_custom)
# Return the highest value (will return a single value not a Series)
np.max(series_custom)
Avengers: Age of Ultron (2015)               148
Cinderella (2015)                            170
Ant-Man (2015)                               160
Do You Believe? (2015)                        36
Hot Tub Time Machine 2 (2015)                 28... 
Mr. Holmes (2015)                            174
'71 (2015)                                   194
Two Days, One Night (2014)                   194
Gett: The Trial of Viviane Amsalem (2015)    200
Kumiko, The Treasure Hunter (2015)           174
Length: 146, dtype: int64100
#will actually return a Series object with a boolean value for each film
series_custom > 50
series_greater_than_50 = series_custom[series_custom > 50]criteria_one = series_custom > 50
criteria_two = series_custom < 75
both_criteria = series_custom[criteria_one & criteria_two]
print (both_criteria)
Avengers: Age of Ultron (2015)                                            74
The Water Diviner (2015)                                                  63
Unbroken (2014)                                                           51
Southpaw (2015)                                                           59
Insidious: Chapter 3 (2015)                                               59
The Man From U.N.C.L.E. (2015)                                            68
Run All Night (2015)                                                      60
5 Flights Up (2015)                                                       52
Welcome to Me (2015)                                                      71
Saint Laurent (2015)                                                      51
Maps to the Stars (2015)                                                  60
Pitch Perfect 2 (2015)                                                    67
The Age of Adaline (2015)                                                 54
The DUFF (2015)                                                           71
Ricki and the Flash (2015)                                                64
Unfriended (2015)                                                         60
American Sniper (2015)                                                    72
The Hobbit: The Battle of the Five Armies (2014)                          61
Paper Towns (2015)                                                        55
Big Eyes (2014)                                                           72
Maggie (2015)                                                             54
Focus (2015)                                                              57
The Second Best Exotic Marigold Hotel (2015)                              62
The 100-Year-Old Man Who Climbed Out the Window and Disappeared (2015)    67
Escobar: Paradise Lost (2015)                                             52
Into the Woods (2014)                                                     71
Inherent Vice (2014)                                                      73
Magic Mike XXL (2015)                                                     62
Woman in Gold (2015)                                                      52
The Last Five Years (2015)                                                60
Jurassic World (2015)                                                     71
Minions (2015)                                                            54
Spare Parts (2015)                                                        52
dtype: int64
#data alignment same index
#定义了两个series结构rt_critics = Series(fandango['RottenTomatoes'].values, index=fandango['FILM'])
rt_users = Series(fandango['RottenTomatoes_User'].values, index=fandango['FILM'])
rt_mean = (rt_critics + rt_users)/2print(rt_mean)
FILM
Avengers: Age of Ultron (2015)               80.0
Cinderella (2015)                            82.5
Ant-Man (2015)                               85.0
Do You Believe? (2015)                       51.0
Hot Tub Time Machine 2 (2015)                21.0... 
Mr. Holmes (2015)                            82.5
'71 (2015)                                   89.5
Two Days, One Night (2014)                   87.5
Gett: The Trial of Viviane Amsalem (2015)    90.5
Kumiko, The Treasure Hunter (2015)           75.0
Length: 146, dtype: float64

五、其它操作

import pandas as pd
import numpy as np
df = pd.DataFrame(np.arange(12).reshape(3,4),columns=['A', 'B', 'C', 'D'])
df
ABCD
00123
14567
2891011
type(df)
pandas.core.frame.DataFrame
df.drop(['B','C'],axis=1,inplace=True)
df
AD
003
147
2811
#will return a new DataFrame that is indexed by the values in the specified column 
#and will drop that column from the DataFrame
#without the FILM column dropped 
fandango = pd.read_csv('../../data/fandango_score_comparison.csv')
print (type(fandango))
# 电影名字作为索引
fandango_films = fandango.set_index('FILM', drop=False)
print(fandango_films.index)
<class 'pandas.core.frame.DataFrame'>
Index(['Avengers: Age of Ultron (2015)', 'Cinderella (2015)', 'Ant-Man (2015)','Do You Believe? (2015)', 'Hot Tub Time Machine 2 (2015)','The Water Diviner (2015)', 'Irrational Man (2015)', 'Top Five (2014)','Shaun the Sheep Movie (2015)', 'Love & Mercy (2015)',...'The Woman In Black 2 Angel of Death (2015)', 'Danny Collins (2015)','Spare Parts (2015)', 'Serena (2015)', 'Inside Out (2015)','Mr. Holmes (2015)', ''71 (2015)', 'Two Days, One Night (2014)','Gett: The Trial of Viviane Amsalem (2015)','Kumiko, The Treasure Hunter (2015)'],dtype='object', name='FILM', length=146)
# Slice using either bracket notation or loc[]
#字符也可以进行切片
fandango_films["Avengers: Age of Ultron (2015)":"Hot Tub Time Machine 2 (2015)"]
fandango_films.loc["Avengers: Age of Ultron (2015)":"Hot Tub Time Machine 2 (2015)"]# Specific movie
fandango_films.loc['Kumiko, The Treasure Hunter (2015)']# Selecting list of movies
movies = ['Kumiko, The Treasure Hunter (2015)', 'Do You Believe? (2015)', 'Ant-Man (2015)']
fandango_films.loc[movies]#When selecting multiple rows, a DataFrame is returned, 
#but when selecting an individual row, a Series object is returned instead
FILMRottenTomatoesRottenTomatoes_UserMetacriticMetacritic_UserIMDBFandango_StarsFandango_RatingvalueRT_normRT_user_norm...IMDB_normRT_norm_roundRT_user_norm_roundMetacritic_norm_roundMetacritic_user_norm_roundIMDB_norm_roundMetacritic_user_vote_countIMDB_user_vote_countFandango_votesFandango_Difference
FILM
Kumiko, The Treasure Hunter (2015)Kumiko, The Treasure Hunter (2015)8763686.46.73.53.54.353.15...3.354.53.03.53.03.5195289410.0
Do You Believe? (2015)Do You Believe? (2015)1884224.75.45.04.50.904.20...2.701.04.01.02.52.531313617930.5
Ant-Man (2015)Ant-Man (2015)8090648.17.85.04.54.004.50...3.904.04.53.04.04.0627103660120550.5

3 rows × 22 columns

#The apply() method in Pandas allows us to specify Python logic
#The apply() method requires you to pass in a vectorized operation 
#that can be applied over each Series object.
import numpy as np# returns the data types as a Series
types = fandango_films.dtypes
print (types)
# filter data types to just floats, index attributes returns just column names
float_columns = types[types.values == 'float64'].index
# use bracket notation to filter columns to just float columns
float_df = fandango_films[float_columns]
print (float_df)
# `x` is a Series object representing a column
deviations = float_df.apply(lambda x: np.std(x))#print(deviations)
FILM                           object
RottenTomatoes                  int64
RottenTomatoes_User             int64
Metacritic                      int64
Metacritic_User               float64
IMDB                          float64
Fandango_Stars                float64
Fandango_Ratingvalue          float64
RT_norm                       float64
RT_user_norm                  float64
Metacritic_norm               float64
Metacritic_user_nom           float64
IMDB_norm                     float64
RT_norm_round                 float64
RT_user_norm_round            float64
Metacritic_norm_round         float64
Metacritic_user_norm_round    float64
IMDB_norm_round               float64
Metacritic_user_vote_count      int64
IMDB_user_vote_count            int64
Fandango_votes                  int64
Fandango_Difference           float64
dtype: objectMetacritic_User  IMDB  \
FILM                                                               
Avengers: Age of Ultron (2015)                         7.1   7.8   
Cinderella (2015)                                      7.5   7.1   
Ant-Man (2015)                                         8.1   7.8   
Do You Believe? (2015)                                 4.7   5.4   
Hot Tub Time Machine 2 (2015)                          3.4   5.1   
...                                                    ...   ...   
Mr. Holmes (2015)                                      7.9   7.4   
'71 (2015)                                             7.5   7.2   
Two Days, One Night (2014)                             8.8   7.4   
Gett: The Trial of Viviane Amsalem (2015)              7.3   7.8   
Kumiko, The Treasure Hunter (2015)                     6.4   6.7   Fandango_Stars  \
FILM                                                        
Avengers: Age of Ultron (2015)                        5.0   
Cinderella (2015)                                     5.0   
Ant-Man (2015)                                        5.0   
Do You Believe? (2015)                                5.0   
Hot Tub Time Machine 2 (2015)                         3.5   
...                                                   ...   
Mr. Holmes (2015)                                     4.0   
'71 (2015)                                            3.5   
Two Days, One Night (2014)                            3.5   
Gett: The Trial of Viviane Amsalem (2015)             3.5   
Kumiko, The Treasure Hunter (2015)                    3.5   Fandango_Ratingvalue  RT_norm  \
FILM                                                                       
Avengers: Age of Ultron (2015)                              4.5     3.70   
Cinderella (2015)                                           4.5     4.25   
Ant-Man (2015)                                              4.5     4.00   
Do You Believe? (2015)                                      4.5     0.90   
Hot Tub Time Machine 2 (2015)                               3.0     0.70   
...                                                         ...      ...   
Mr. Holmes (2015)                                           4.0     4.35   
'71 (2015)                                                  3.5     4.85   
Two Days, One Night (2014)                                  3.5     4.85   
Gett: The Trial of Viviane Amsalem (2015)                   3.5     5.00   
Kumiko, The Treasure Hunter (2015)                          3.5     4.35   RT_user_norm  Metacritic_norm  \
FILM                                                                       
Avengers: Age of Ultron (2015)                     4.30             3.30   
Cinderella (2015)                                  4.00             3.35   
Ant-Man (2015)                                     4.50             3.20   
Do You Believe? (2015)                             4.20             1.10   
Hot Tub Time Machine 2 (2015)                      1.40             1.45   
...                                                 ...              ...   
Mr. Holmes (2015)                                  3.90             3.35   
'71 (2015)                                         4.10             4.15   
Two Days, One Night (2014)                         3.90             4.45   
Gett: The Trial of Viviane Amsalem (2015)          4.05             4.50   
Kumiko, The Treasure Hunter (2015)                 3.15             3.40   Metacritic_user_nom  IMDB_norm  \
FILM                                                                        
Avengers: Age of Ultron (2015)                            3.55       3.90   
Cinderella (2015)                                         3.75       3.55   
Ant-Man (2015)                                            4.05       3.90   
Do You Believe? (2015)                                    2.35       2.70   
Hot Tub Time Machine 2 (2015)                             1.70       2.55   
...                                                        ...        ...   
Mr. Holmes (2015)                                         3.95       3.70   
'71 (2015)                                                3.75       3.60   
Two Days, One Night (2014)                                4.40       3.70   
Gett: The Trial of Viviane Amsalem (2015)                 3.65       3.90   
Kumiko, The Treasure Hunter (2015)                        3.20       3.35   RT_norm_round  RT_user_norm_round  \
FILM                                                                           
Avengers: Age of Ultron (2015)                       3.5                 4.5   
Cinderella (2015)                                    4.5                 4.0   
Ant-Man (2015)                                       4.0                 4.5   
Do You Believe? (2015)                               1.0                 4.0   
Hot Tub Time Machine 2 (2015)                        0.5                 1.5   
...                                                  ...                 ...   
Mr. Holmes (2015)                                    4.5                 4.0   
'71 (2015)                                           5.0                 4.0   
Two Days, One Night (2014)                           5.0                 4.0   
Gett: The Trial of Viviane Amsalem (2015)            5.0                 4.0   
Kumiko, The Treasure Hunter (2015)                   4.5                 3.0   Metacritic_norm_round  \
FILM                                                               
Avengers: Age of Ultron (2015)                               3.5   
Cinderella (2015)                                            3.5   
Ant-Man (2015)                                               3.0   
Do You Believe? (2015)                                       1.0   
Hot Tub Time Machine 2 (2015)                                1.5   
...                                                          ...   
Mr. Holmes (2015)                                            3.5   
'71 (2015)                                                   4.0   
Two Days, One Night (2014)                                   4.5   
Gett: The Trial of Viviane Amsalem (2015)                    4.5   
Kumiko, The Treasure Hunter (2015)                           3.5   Metacritic_user_norm_round  \
FILM                                                                    
Avengers: Age of Ultron (2015)                                    3.5   
Cinderella (2015)                                                 4.0   
Ant-Man (2015)                                                    4.0   
Do You Believe? (2015)                                            2.5   
Hot Tub Time Machine 2 (2015)                                     1.5   
...                                                               ...   
Mr. Holmes (2015)                                                 4.0   
'71 (2015)                                                        4.0   
Two Days, One Night (2014)                                        4.5   
Gett: The Trial of Viviane Amsalem (2015)                         3.5   
Kumiko, The Treasure Hunter (2015)                                3.0   IMDB_norm_round  \
FILM                                                         
Avengers: Age of Ultron (2015)                         4.0   
Cinderella (2015)                                      3.5   
Ant-Man (2015)                                         4.0   
Do You Believe? (2015)                                 2.5   
Hot Tub Time Machine 2 (2015)                          2.5   
...                                                    ...   
Mr. Holmes (2015)                                      3.5   
'71 (2015)                                             3.5   
Two Days, One Night (2014)                             3.5   
Gett: The Trial of Viviane Amsalem (2015)              4.0   
Kumiko, The Treasure Hunter (2015)                     3.5   Fandango_Difference  
FILM                                                            
Avengers: Age of Ultron (2015)                             0.5  
Cinderella (2015)                                          0.5  
Ant-Man (2015)                                             0.5  
Do You Believe? (2015)                                     0.5  
Hot Tub Time Machine 2 (2015)                              0.5  
...                                                        ...  
Mr. Holmes (2015)                                          0.0  
'71 (2015)                                                 0.0  
Two Days, One Night (2014)                                 0.0  
Gett: The Trial of Viviane Amsalem (2015)                  0.0  
Kumiko, The Treasure Hunter (2015)                         0.0  [146 rows x 15 columns]
rt_mt_user = float_df[['RT_user_norm', 'Metacritic_user_nom']]
# 匿名函数
rt_mt_user.apply(lambda x: np.std(x), axis=1)
FILM
Avengers: Age of Ultron (2015)               0.375
Cinderella (2015)                            0.125
Ant-Man (2015)                               0.225
Do You Believe? (2015)                       0.925
Hot Tub Time Machine 2 (2015)                0.150...  
Mr. Holmes (2015)                            0.025
'71 (2015)                                   0.175
Two Days, One Night (2014)                   0.250
Gett: The Trial of Viviane Amsalem (2015)    0.200
Kumiko, The Treasure Hunter (2015)           0.025
Length: 146, dtype: float64

参考

  • 图解

这篇关于python-pandas-操作全集(持续更新)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/908080

相关文章

Python获取中国节假日数据记录入JSON文件

《Python获取中国节假日数据记录入JSON文件》项目系统内置的日历应用为了提升用户体验,特别设置了在调休日期显示“休”的UI图标功能,那么问题是这些调休数据从哪里来呢?我尝试一种更为智能的方法:P... 目录节假日数据获取存入jsON文件节假日数据读取封装完整代码项目系统内置的日历应用为了提升用户体验,

Python FastAPI+Celery+RabbitMQ实现分布式图片水印处理系统

《PythonFastAPI+Celery+RabbitMQ实现分布式图片水印处理系统》这篇文章主要为大家详细介绍了PythonFastAPI如何结合Celery以及RabbitMQ实现简单的分布式... 实现思路FastAPI 服务器Celery 任务队列RabbitMQ 作为消息代理定时任务处理完整

Python Websockets库的使用指南

《PythonWebsockets库的使用指南》pythonwebsockets库是一个用于创建WebSocket服务器和客户端的Python库,它提供了一种简单的方式来实现实时通信,支持异步和同步... 目录一、WebSocket 简介二、python 的 websockets 库安装三、完整代码示例1.

揭秘Python Socket网络编程的7种硬核用法

《揭秘PythonSocket网络编程的7种硬核用法》Socket不仅能做聊天室,还能干一大堆硬核操作,这篇文章就带大家看看Python网络编程的7种超实用玩法,感兴趣的小伙伴可以跟随小编一起... 目录1.端口扫描器:探测开放端口2.简易 HTTP 服务器:10 秒搭个网页3.局域网游戏:多人联机对战4.

使用Python实现快速搭建本地HTTP服务器

《使用Python实现快速搭建本地HTTP服务器》:本文主要介绍如何使用Python快速搭建本地HTTP服务器,轻松实现一键HTTP文件共享,同时结合二维码技术,让访问更简单,感兴趣的小伙伴可以了... 目录1. 概述2. 快速搭建 HTTP 文件共享服务2.1 核心思路2.2 代码实现2.3 代码解读3.

Python使用自带的base64库进行base64编码和解码

《Python使用自带的base64库进行base64编码和解码》在Python中,处理数据的编码和解码是数据传输和存储中非常普遍的需求,其中,Base64是一种常用的编码方案,本文我将详细介绍如何使... 目录引言使用python的base64库进行编码和解码编码函数解码函数Base64编码的应用场景注意

Python基于wxPython和FFmpeg开发一个视频标签工具

《Python基于wxPython和FFmpeg开发一个视频标签工具》在当今数字媒体时代,视频内容的管理和标记变得越来越重要,无论是研究人员需要对实验视频进行时间点标记,还是个人用户希望对家庭视频进行... 目录引言1. 应用概述2. 技术栈分析2.1 核心库和模块2.2 wxpython作为GUI选择的优

Mysql表的简单操作(基本技能)

《Mysql表的简单操作(基本技能)》在数据库中,表的操作主要包括表的创建、查看、修改、删除等,了解如何操作这些表是数据库管理和开发的基本技能,本文给大家介绍Mysql表的简单操作,感兴趣的朋友一起看... 目录3.1 创建表 3.2 查看表结构3.3 修改表3.4 实践案例:修改表在数据库中,表的操作主要

C# WinForms存储过程操作数据库的实例讲解

《C#WinForms存储过程操作数据库的实例讲解》:本文主要介绍C#WinForms存储过程操作数据库的实例,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、存储过程基础二、C# 调用流程1. 数据库连接配置2. 执行存储过程(增删改)3. 查询数据三、事务处

Pandas使用SQLite3实战

《Pandas使用SQLite3实战》本文主要介绍了Pandas使用SQLite3实战,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学... 目录1 环境准备2 从 SQLite3VlfrWQzgt 读取数据到 DataFrame基础用法:读