In [2]:
import numpy as np
import pandas as pd
In [98]:
def hits(score,iternum = 10):
m = score.shape[0]
n = score.shape[1]
score_ = (score.T.dot(np.zeros(m)+1.0))/m
B = []
for i in range(m):
for j in range(n):
B.append(score_[j]/score[i,j])
B = np.array(B).reshape(m,n)
p = np.zeros(m)+1
print 'p',0,p
for i in range(iternum):
u = score.T.dot(p)/score.T.dot(p).sum()
print 'u',i,u
p = B.dot(u)/B.dot(u).sum()
print 'p',i+1,p
return p,u
In [86]:
score211f = pd.read_csv('./score211f.csv')
In [87]:
score211f
Out[87]:
31
46
38
47
143
48
557
43
52
558
...
136
128
44
51
37
96
332
199
935
57
0
1.241757
1.144449
1.148650
1.182423
1.090285
1.146862
1.130340
1.009606
1.184987
1.094615
...
1.124140
1.023876
1.061689
1.029915
1.005983
1.052084
1.085621
1.024177
1.054131
1.092388
1
1.304481
1.286889
1.148650
1.182423
1.196000
1.146862
1.130340
1.111074
1.184987
1.197963
...
1.207556
1.111556
1.167519
1.140296
1.083667
1.043074
1.086634
1.020815
1.044444
1.092388
2
1.359925
1.340367
1.240804
1.205480
1.276984
1.146862
1.227457
1.201646
1.184987
1.240499
...
1.256917
1.170336
1.231309
1.190352
1.181426
1.052084
1.085008
1.037105
1.088482
1.092388
3
1.216879
1.196724
1.144879
1.173017
1.160390
1.144113
1.129140
1.131584
1.188659
1.153808
...
1.150305
1.071869
1.125392
1.079413
1.071527
1.052084
1.070553
1.024177
1.054131
1.095070
4
1.248940
1.212397
1.140773
1.113938
1.151629
1.146862
1.128582
1.078958
1.188903
1.146488
...
1.148456
1.065846
1.119248
1.081084
1.056290
1.052084
1.098584
1.024177
1.028224
1.092388
5
1.220869
1.191011
1.114986
1.164019
1.135872
1.128401
1.106699
1.086049
1.184987
1.117932
...
1.141423
1.085311
1.111381
1.102095
1.074000
1.049640
1.062819
1.030015
1.055217
1.092388
6
1.239862
1.218716
1.141184
1.185641
1.160731
1.145862
1.130154
1.112588
1.192846
1.141123
...
1.146745
1.092402
1.131068
1.101665
1.068238
1.052084
1.094770
1.024177
1.028688
1.094444
7
1.351962
1.323274
1.148650
1.182423
1.213403
1.146862
1.130340
1.106336
1.184987
1.186049
...
1.174473
1.127638
1.183503
1.135253
1.120234
1.052084
1.147377
0.998577
1.031946
1.092388
8
1.185794
1.163258
1.148650
1.152243
1.131966
1.122056
1.107959
1.080855
1.138603
1.124379
...
1.137639
1.095853
1.121929
1.097972
1.084141
1.058002
1.063761
1.017638
1.057101
1.092388
9
1.211694
1.186025
1.125742
1.182423
1.150653
1.127625
1.062914
1.106320
1.184987
1.117839
...
1.141738
1.094820
1.122240
1.093968
1.094773
1.062923
1.113542
1.027505
1.062090
1.095813
10
1.274686
1.250568
1.148650
1.182423
1.178092
1.146862
1.130340
1.106336
1.184987
1.161210
...
1.174473
1.115240
1.153700
1.118314
1.096524
1.052084
1.085621
1.024177
1.054131
1.091349
11
1.174709
1.141653
1.076492
1.113784
1.088618
1.146862
1.062519
1.046939
1.127752
1.084291
...
1.103428
1.055586
1.075602
1.053841
1.032147
1.015622
1.019955
1.024177
1.013010
1.092388
12
1.297583
1.270283
1.148650
1.182423
1.182351
1.146862
1.118730
1.105149
1.184987
1.169064
...
1.184198
1.129009
1.170303
1.117983
1.079501
1.052496
1.076120
0.998113
1.039544
1.092388
13
1.361139
1.319461
1.247315
1.171299
1.221276
1.146862
1.207681
1.175063
1.184987
1.260874
...
1.280117
1.169352
1.222361
1.149329
1.146653
1.052084
1.121976
1.016724
1.070010
1.092388
14
1.185129
1.116619
1.080171
1.099084
1.088892
1.059670
1.048025
1.039346
1.103495
1.090380
...
1.109326
1.033490
1.080180
1.045160
1.027701
1.052084
1.020400
1.012872
1.007276
1.033456
15
1.219676
1.193392
1.100884
1.182423
1.122327
1.107302
1.130340
1.071970
1.138300
1.109491
...
1.128072
1.079335
1.112163
1.075568
1.062626
1.022412
1.053220
0.985859
1.025189
1.092388
16
1.249202
1.223580
1.157598
1.196168
1.179657
1.156699
1.142926
1.119110
1.190579
1.157545
...
1.154808
1.105417
1.145677
1.109087
1.109019
1.059582
1.081553
1.021066
1.068706
1.110985
17
1.243259
1.213517
1.134064
1.182423
1.158669
1.139588
1.117672
1.103494
1.184987
1.130313
...
1.147533
1.108073
1.138849
1.103141
1.102520
1.052084
1.078537
1.022920
1.062174
1.097175
18
1.274686
1.250568
1.148650
1.182423
1.178092
1.146862
1.130340
1.106336
1.184987
1.161210
...
1.174473
1.115240
1.153700
1.118314
1.096524
1.052084
1.085621
1.024177
1.054131
1.058234
19
1.292825
1.331491
1.148650
1.262594
1.213788
1.146862
1.130340
1.130794
1.274293
1.219160
...
1.221744
1.140193
1.188143
1.118314
1.097479
1.052084
1.085621
1.024177
1.065153
1.092388
20
1.274686
1.250568
1.148650
1.182423
1.178092
1.146862
1.130340
1.106336
1.184987
1.161210
...
1.174473
1.115240
1.153700
1.118314
1.096524
1.052084
1.085621
1.024177
1.054131
1.092388
21
1.267455
1.216930
1.131401
1.182423
1.156767
1.142144
1.102465
1.096272
1.165404
1.138077
...
1.146859
1.113940
1.140142
1.109121
1.091432
1.076892
1.081773
1.015541
1.072052
1.092388
22
1.253058
1.210554
1.130219
1.183339
1.149311
1.139869
1.113381
1.099106
1.170854
1.139581
...
1.152050
1.107709
1.149103
1.102118
1.088714
1.062386
1.075582
1.012277
1.067945
1.092388
23
1.294745
1.268745
1.153303
1.182423
1.184086
1.146862
1.141955
1.088757
1.184987
1.160955
...
1.171310
1.106823
1.159876
1.122185
1.115895
1.052084
1.084974
1.037836
1.052316
1.092388
24
1.235712
1.210747
1.147109
1.187603
1.165907
1.146862
1.127073
1.101192
1.184987
1.158080
...
1.170461
1.124710
1.153651
1.132246
1.100114
1.052084
1.101109
1.023726
1.086162
1.092388
25
1.274686
1.493290
1.148650
1.182423
1.289610
1.146862
1.130340
1.106336
1.184987
1.256012
...
1.270197
1.336364
1.225605
1.264556
1.171570
1.052084
1.085621
1.024177
1.054131
1.092388
26
1.347078
1.308984
1.148650
1.182423
1.208317
1.146862
1.130340
1.117784
1.237398
1.172070
...
1.212549
1.124944
1.198932
1.152361
1.104710
1.054096
1.092929
1.005324
1.022264
1.092388
27
1.288491
1.254340
1.188472
1.233189
1.205585
1.194925
1.173264
1.143434
1.236623
1.189358
...
1.206302
1.127340
1.174925
1.133623
1.118057
1.052084
1.097962
1.025321
1.061472
1.092388
28
1.203488
1.172046
1.102189
1.096021
1.128376
1.146862
1.107420
1.084719
1.149341
1.124899
...
1.133625
1.079472
1.108297
1.092570
1.069866
1.044536
1.064623
1.016587
1.052396
1.092388
29
1.353002
1.323468
1.194301
1.278615
1.235355
1.206924
1.194179
1.132414
1.271752
1.214828
...
1.225429
1.137132
1.197181
1.149326
1.145343
1.075429
1.105086
1.036152
1.077635
1.154963
30
1.476851
1.415569
1.148650
1.182423
1.288171
1.146862
1.130340
1.106336
1.184987
1.170461
...
1.162377
1.143085
1.216722
1.165950
1.130794
1.052084
1.098605
1.024177
1.054131
1.092388
31
1.365650
1.318709
1.221118
1.285150
1.229701
1.240887
1.186950
1.190514
1.184987
1.208947
...
1.249953
1.180488
1.224299
1.182609
1.164784
1.052084
1.148698
1.145753
1.113778
1.092388
32 rows × 100 columns
In [88]:
score = np.array(score211f)
In [89]:
m = score.shape[0]
n = score.shape[1]
m,n
Out[89]:
(32L, 100L)
In [90]:
score_ = (score.T.dot(np.zeros(m)+1.0))/m
score_
Out[90]:
array([ 1.27468625, 1.25056846, 1.14865037, 1.18242267, 1.17809234,
1.14686175, 1.13034012, 1.10633602, 1.1849869 , 1.16120967,
1.2080692 , 1.18429913, 1.20842357, 0.99877973, 1.10004221,
1.12602067, 1.14580553, 1.10584764, 1.07404075, 1.08762574,
1.29115331, 1.10100887, 1.18649738, 1.17323036, 1.08676695,
1.15797287, 1.08995158, 1.03781734, 1.25829489, 1.11364391,
1.21189507, 1.13008786, 1.12941091, 1.12592926, 1.10727913,
1.09086752, 1.10861039, 1.14274587, 1.06790351, 1.07512207,
1.12538236, 1.20680894, 1.16727719, 1.16863127, 1.08108097,
1.07847516, 1.11450416, 1.08025997, 1.20148458, 1.09974944,
1.12394746, 1.10840386, 1.05203267, 1.25722602, 1.11536247,
1.09806779, 1.08946523, 1.08359584, 1.08565334, 1.19871246,
1.15111275, 1.15229438, 1.08003738, 1.14576862, 1.10301836,
1.15185158, 1.12384341, 1.06014727, 1.09134423, 1.07715561,
1.04579421, 1.17128888, 1.0956705 , 1.11190067, 1.037872 ,
0.97627111, 1.21458417, 1.09491708, 1.23519944, 1.22395194,
1.16438074, 1.16739737, 1.20750546, 1.0499905 , 1.1698981 ,
1.17426031, 1.07832606, 1.03851382, 1.09924592, 1.10599723,
1.1744734 , 1.11524025, 1.15369957, 1.11831372, 1.09652437,
1.05208379, 1.08562111, 1.02417743, 1.05413093, 1.09238767])
In [91]:
B = []
for i in range(m):
for j in range(n):
B.append(score_[j]/score[i,j])
B = np.array(B).reshape(m,n)
B
Out[91]:
array([[ 1.02651795, 1.09272547, 1. , ..., 1. ,
1. , 1. ],
[ 0.97715933, 0.97177656, 1. , ..., 1.00329405,
1.0092743 , 1. ],
[ 0.93732109, 0.93300466, 0.9257307 , ..., 0.98753512,
0.9684417 , 1. ],
...,
[ 0.94211673, 0.94491769, 0.9617759 , ..., 0.98844327,
0.97818939, 0.9458203 ],
[ 0.86311102, 0.88343892, 1. , ..., 1. ,
1. , 1. ],
[ 0.93339141, 0.94832796, 0.94065468, ..., 0.89389019,
0.94644658, 1. ]])
In [92]:
p = np.zeros(m)+1
p
Out[92]:
array([ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
1., 1., 1., 1., 1., 1.])
In [93]:
u = score.T.dot(p)/score.T.dot(p).sum()
u,u.sum()
Out[93]:
(array([ 0.01130125, 0.01108742, 0.01018383, 0.01048325, 0.01044486,
0.01016797, 0.01002149, 0.00980867, 0.01050598, 0.01029518,
0.01071063, 0.01049989, 0.01071377, 0.00885509, 0.00975287,
0.0099832 , 0.01015861, 0.00980434, 0.00952235, 0.00964279,
0.01144725, 0.00976144, 0.01051938, 0.01040175, 0.00963518,
0.01026648, 0.00966341, 0.00920119, 0.01115593, 0.00987346,
0.01074455, 0.01001925, 0.01001325, 0.00998238, 0.00981703,
0.00967153, 0.00982884, 0.01013148, 0.00946793, 0.00953193,
0.00997754, 0.01069946, 0.01034897, 0.01036098, 0.00958476,
0.00956166, 0.00988109, 0.00957749, 0.01065225, 0.00975028,
0.00996481, 0.00982701, 0.00932722, 0.01114645, 0.0098887 ,
0.00973537, 0.0096591 , 0.00960706, 0.0096253 , 0.01062767,
0.01020566, 0.01021614, 0.00957551, 0.01015828, 0.00977926,
0.01021221, 0.00996389, 0.00939917, 0.00967576, 0.00954996,
0.00927191, 0.01038454, 0.00971411, 0.00985801, 0.00920168,
0.00865553, 0.01076839, 0.00970743, 0.01095116, 0.01085144,
0.01032329, 0.01035004, 0.01070563, 0.00930912, 0.01037221,
0.01041088, 0.00956034, 0.00920737, 0.00974581, 0.00980567,
0.01041277, 0.00988762, 0.01022859, 0.00991487, 0.00972168,
0.00932768, 0.00962502, 0.00908026, 0.00934583, 0.00968501]),
0.99999999999999978)
In [94]:
B.dot(u)
Out[94]:
array([ 1.04147202, 0.99308496, 0.95790495, 1.0170451 , 1.01878089,
1.01854763, 1.01151131, 0.98645682, 1.02135205, 1.01468458,
1.00196658, 1.04498135, 0.99658051, 0.96887038, 1.0594361 ,
1.02827965, 0.99810438, 1.00807809, 1.00363828, 0.98103997,
0.99998962, 1.00557101, 1.00776109, 1.00048144, 0.99863275,
0.97568339, 0.98272309, 0.97980498, 1.02367888, 0.96586226,
0.98031055, 0.95058992])
In [95]:
p = B.dot(u)/B.dot(u).sum()
p,p.sum()
Out[95]:
(array([ 0.03250242, 0.03099235, 0.02989445, 0.0317401 , 0.03179427,
0.03178699, 0.0315674 , 0.0307855 , 0.03187452, 0.03166644,
0.03126953, 0.03261194, 0.03110144, 0.03023666, 0.03306305,
0.03209071, 0.031149 , 0.03146026, 0.0313217 , 0.03061645,
0.03120783, 0.03138202, 0.03145037, 0.03122318, 0.03116549,
0.03044928, 0.03066898, 0.03057791, 0.03194713, 0.03014278,
0.03059369, 0.02966616]), 1.0)
In [99]:
p,u = hits(score,iternum=10)
p 0 [ 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.
1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
u 0 [ 0.01130125 0.01108742 0.01018383 0.01048325 0.01044486 0.01016797
0.01002149 0.00980867 0.01050598 0.01029518 0.01071063 0.01049989
0.01071377 0.00885509 0.00975287 0.0099832 0.01015861 0.00980434
0.00952235 0.00964279 0.01144725 0.00976144 0.01051938 0.01040175
0.00963518 0.01026648 0.00966341 0.00920119 0.01115593 0.00987346
0.01074455 0.01001925 0.01001325 0.00998238 0.00981703 0.00967153
0.00982884 0.01013148 0.00946793 0.00953193 0.00997754 0.01069946
0.01034897 0.01036098 0.00958476 0.00956166 0.00988109 0.00957749
0.01065225 0.00975028 0.00996481 0.00982701 0.00932722 0.01114645
0.0098887 0.00973537 0.0096591 0.00960706 0.0096253 0.01062767
0.01020566 0.01021614 0.00957551 0.01015828 0.00977926 0.01021221
0.00996389 0.00939917 0.00967576 0.00954996 0.00927191 0.01038454
0.00971411 0.00985801 0.00920168 0.00865553 0.01076839 0.00970743
0.01095116 0.01085144 0.01032329 0.01035004 0.01070563 0.00930912
0.01037221 0.01041088 0.00956034 0.00920737 0.00974581 0.00980567
0.01041277 0.00988762 0.01022859 0.00991487 0.00972168 0.00932768
0.00962502 0.00908026 0.00934583 0.00968501]
p 1 [ 0.03250242 0.03099235 0.02989445 0.0317401 0.03179427 0.03178699
0.0315674 0.0307855 0.03187452 0.03166644 0.03126953 0.03261194
0.03110144 0.03023666 0.03306305 0.03209071 0.031149 0.03146026
0.0313217 0.03061645 0.03120783 0.03138202 0.03145037 0.03122318
0.03116549 0.03044928 0.03066898 0.03057791 0.03194713 0.03014278
0.03059369 0.02966616]
u 1 [ 0.01129668 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981016
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.0102687 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981582 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966374 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955212 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931286
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908352 0.00934843 0.00968929]
p 2 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 2 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 3 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 3 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 4 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 4 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 5 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 5 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 6 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 6 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 7 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 7 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 8 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 8 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 9 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
u 9 [ 0.01129669 0.01107966 0.01018324 0.01048292 0.01044101 0.01016985
0.01002112 0.00980742 0.01050756 0.0102926 0.01070589 0.01049588
0.01070842 0.00886203 0.00975552 0.00998493 0.01015361 0.00981015
0.00952364 0.00964244 0.0114415 0.00976241 0.01051719 0.01040149
0.0096351 0.01026869 0.00966781 0.00920327 0.01114977 0.00987825
0.0107424 0.01001943 0.01001241 0.00998594 0.00981583 0.00967381
0.00983468 0.01013571 0.00946931 0.00953504 0.00998108 0.01069887
0.01034788 0.01036345 0.0095854 0.00956333 0.00988031 0.00957838
0.01064593 0.00975081 0.00996321 0.00982836 0.0093284 0.01114006
0.00989289 0.00973573 0.00966373 0.00960631 0.00962443 0.01062395
0.01019753 0.01021454 0.00957491 0.01015646 0.00978134 0.01021044
0.00996859 0.00940452 0.00967394 0.00955211 0.00927787 0.0103835
0.00971564 0.00985683 0.00920713 0.00866301 0.01076185 0.00971245
0.01094547 0.0108495 0.01031881 0.01035075 0.01069983 0.00931285
0.01036753 0.01040652 0.0095603 0.00921086 0.00974906 0.00980527
0.01041024 0.00988486 0.01022555 0.00991263 0.00971978 0.00933247
0.00962663 0.00908351 0.00934843 0.00968928]
p 10 [ 0.03250211 0.03099247 0.02989476 0.03173998 0.03179425 0.03178686
0.03156733 0.03078566 0.03187432 0.03166627 0.03126952 0.03261165
0.03110149 0.03023705 0.0330627 0.03209058 0.03114891 0.03146016
0.03132168 0.03061659 0.03120784 0.03138194 0.03145029 0.03122329
0.03116541 0.03044959 0.03066915 0.03057793 0.03194696 0.03014291
0.03059402 0.02966632]
In [100]:
p
Out[100]:
array([ 0.03250211, 0.03099247, 0.02989476, 0.03173998, 0.03179425,
0.03178686, 0.03156733, 0.03078566, 0.03187432, 0.03166627,
0.03126952, 0.03261165, 0.03110149, 0.03023705, 0.0330627 ,
0.03209058, 0.03114891, 0.03146016, 0.03132168, 0.03061659,
0.03120784, 0.03138194, 0.03145029, 0.03122329, 0.03116541,
0.03044959, 0.03066915, 0.03057793, 0.03194696, 0.03014291,
0.03059402, 0.02966632])
In [101]:
u
Out[101]:
array([ 0.01129669, 0.01107966, 0.01018324, 0.01048292, 0.01044101,
0.01016985, 0.01002112, 0.00980742, 0.01050756, 0.0102926 ,
0.01070589, 0.01049588, 0.01070842, 0.00886203, 0.00975552,
0.00998493, 0.01015361, 0.00981015, 0.00952364, 0.00964244,
0.0114415 , 0.00976241, 0.01051719, 0.01040149, 0.0096351 ,
0.01026869, 0.00966781, 0.00920327, 0.01114977, 0.00987825,
0.0107424 , 0.01001943, 0.01001241, 0.00998594, 0.00981583,
0.00967381, 0.00983468, 0.01013571, 0.00946931, 0.00953504,
0.00998108, 0.01069887, 0.01034788, 0.01036345, 0.0095854 ,
0.00956333, 0.00988031, 0.00957838, 0.01064593, 0.00975081,
0.00996321, 0.00982836, 0.0093284 , 0.01114006, 0.00989289,
0.00973573, 0.00966373, 0.00960631, 0.00962443, 0.01062395,
0.01019753, 0.01021454, 0.00957491, 0.01015646, 0.00978134,
0.01021044, 0.00996859, 0.00940452, 0.00967394, 0.00955211,
0.00927787, 0.0103835 , 0.00971564, 0.00985683, 0.00920713,
0.00866301, 0.01076185, 0.00971245, 0.01094547, 0.0108495 ,
0.01031881, 0.01035075, 0.01069983, 0.00931285, 0.01036753,
0.01040652, 0.0095603 , 0.00921086, 0.00974906, 0.00980527,
0.01041024, 0.00988486, 0.01022555, 0.00991263, 0.00971978,
0.00933247, 0.00962663, 0.00908351, 0.00934843, 0.00968928])
In [156]:
school = pd.read_csv('./schoolcode.csv')
In [158]:
school.head()
Out[158]:
schoolname
schoolid
0
������ѧ
31
1
�й������ѧ
46
2
������ͨ��ѧ
38
3
�������պ����ѧ
47
4
��������ѧ
143
In [105]:
province = u'00上海01云南02内蒙古03北京04吉林05四川06天津07宁夏08安徽09山东10山西11广东12广西13新疆14江苏15江西16河北17河南18浙江19海南21湖北22湖南23甘肃24福建25西藏26贵州27辽宁28重庆29陕西30青海31黑龙江32香港33澳门'
In [114]:
import re
province = [(i[:2],i[2:5]) for i in re.findall(u'[0-9]{2}.{2}',province)]
In [115]:
province
Out[115]:
[(u'00', u'\u4e0a\u6d77'),
(u'01', u'\u4e91\u5357'),
(u'02', u'\u5185\u8499'),
(u'03', u'\u5317\u4eac'),
(u'04', u'\u5409\u6797'),
(u'05', u'\u56db\u5ddd'),
(u'06', u'\u5929\u6d25'),
(u'07', u'\u5b81\u590f'),
(u'08', u'\u5b89\u5fbd'),
(u'09', u'\u5c71\u4e1c'),
(u'10', u'\u5c71\u897f'),
(u'11', u'\u5e7f\u4e1c'),
(u'12', u'\u5e7f\u897f'),
(u'13', u'\u65b0\u7586'),
(u'14', u'\u6c5f\u82cf'),
(u'15', u'\u6c5f\u897f'),
(u'16', u'\u6cb3\u5317'),
(u'17', u'\u6cb3\u5357'),
(u'18', u'\u6d59\u6c5f'),
(u'19', u'\u6d77\u5357'),
(u'21', u'\u6e56\u5317'),
(u'22', u'\u6e56\u5357'),
(u'23', u'\u7518\u8083'),
(u'24', u'\u798f\u5efa'),
(u'25', u'\u897f\u85cf'),
(u'26', u'\u8d35\u5dde'),
(u'27', u'\u8fbd\u5b81'),
(u'28', u'\u91cd\u5e86'),
(u'29', u'\u9655\u897f'),
(u'30', u'\u9752\u6d77'),
(u'31', u'\u9ed1\u9f99'),
(u'32', u'\u9999\u6e2f'),
(u'33', u'\u6fb3\u95e8')]
In [116]:
provinced = {}
In [117]:
for k,v in province:
provinced[k] = v
provinced
Out[117]:
{u'00': u'\u4e0a\u6d77',
u'01': u'\u4e91\u5357',
u'02': u'\u5185\u8499',
u'03': u'\u5317\u4eac',
u'04': u'\u5409\u6797',
u'05': u'\u56db\u5ddd',
u'06': u'\u5929\u6d25',
u'07': u'\u5b81\u590f',
u'08': u'\u5b89\u5fbd',
u'09': u'\u5c71\u4e1c',
u'10': u'\u5c71\u897f',
u'11': u'\u5e7f\u4e1c',
u'12': u'\u5e7f\u897f',
u'13': u'\u65b0\u7586',
u'14': u'\u6c5f\u82cf',
u'15': u'\u6c5f\u897f',
u'16': u'\u6cb3\u5317',
u'17': u'\u6cb3\u5357',
u'18': u'\u6d59\u6c5f',
u'19': u'\u6d77\u5357',
u'21': u'\u6e56\u5317',
u'22': u'\u6e56\u5357',
u'23': u'\u7518\u8083',
u'24': u'\u798f\u5efa',
u'25': u'\u897f\u85cf',
u'26': u'\u8d35\u5dde',
u'27': u'\u8fbd\u5b81',
u'28': u'\u91cd\u5e86',
u'29': u'\u9655\u897f',
u'30': u'\u9752\u6d77',
u'31': u'\u9ed1\u9f99',
u'32': u'\u9999\u6e2f',
u'33': u'\u6fb3\u95e8'}
In [131]:
ps = {}
for i in range(len(p)):
if i >= len(p)-1:
break
if i > 19:
i = i+1
k = str(i)
if i < 10:
k = '0'+str(i)
print provinced[k],
print p[i]
ps[provinced[k]] = p[i]
上海 0.0325021079396
云南 0.0309924664155
内蒙 0.0298947562454
北京 0.0317399839803
吉林 0.0317942525734
四川 0.031786859168
天津 0.0315673282928
宁夏 0.0307856597478
安徽 0.0318743155787
山东 0.0316662743995
山西 0.0312695212961
广东 0.0326116543388
广西 0.031101490638
新疆 0.0302370469006
江苏 0.033062698991
江西 0.0320905823493
河北 0.0311489144946
河南 0.0314601571564
浙江 0.0313216842554
海南 0.030616591896
湖北 0.0313819386057
湖南 0.0314502885316
甘肃 0.0312232947321
福建 0.0311654065822
西藏 0.0304495925934
贵州 0.0306691516742
辽宁 0.0305779310135
重庆 0.0319469576357
陕西 0.0301429117778
青海 0.0305940201826
黑龙 0.0296663188588
In [140]:
pss = sorted(ps.items(),key= lambda item: item[1],reverse=True)
In [141]:
for k,v in pss:
print k,v
江苏 0.033062698991
广东 0.0326116543388
上海 0.0325021079396
江西 0.0320905823493
重庆 0.0319469576357
安徽 0.0318743155787
吉林 0.0317942525734
四川 0.031786859168
北京 0.0317399839803
山东 0.0316662743995
天津 0.0315673282928
河南 0.0314601571564
湖南 0.0314502885316
湖北 0.0313819386057
浙江 0.0313216842554
山西 0.0312695212961
甘肃 0.0312232947321
福建 0.0311654065822
河北 0.0311489144946
广西 0.031101490638
云南 0.0309924664155
宁夏 0.0307856597478
贵州 0.0306691516742
海南 0.030616591896
青海 0.0305940201826
辽宁 0.0305779310135
西藏 0.0304495925934
新疆 0.0302370469006
陕西 0.0301429117778
内蒙 0.0298947562454
黑龙 0.0296663188588
In [177]:
schoold = {}
for row in school.itertuples():
print row.schoolname.decode('gbk')
schoold[row.schoolid] = row.schoolname.decode('gbk')
北京大学
中国人民大学
北京交通大学
北京航空航天大学
北京理工大学
北京邮电大学
中国农业大学
北京林业大学
北京师范大学
中国传媒大学
对外经济贸易大学
中国政法大学
南开大学
内蒙古大学
北京工业大学
北京科技大学
华北电力大学
天津医科大学
太原理工大学
辽宁大学
吉林大学
东北师范大学
清华大学
北京化工大学
北京外国语大学
天津大学
大连海事大学
哈尔滨工业大学
哈尔滨工程大学
东北农业大学
复旦大学
华东理工大学
上海财经大学
上海大学
苏州大学
南京航空航天大学
河海大学
南京师范大学
中国科学技术大学
北京中医药大学
北京体育大学
河北工业大学
大连理工大学
同济大学
华东师范大学
东南大学
中国矿业大学
南京农业大学
中国药科大学
安徽大学
厦门大学
福州大学
中国海洋大学
中央民族大学
东北林业大学
上海交通大学
南京理工大学
江南大学
合肥工业大学
南昌大学
郑州大学
武汉大学
中南财经政法大学
中南大学
湖南师范大学
暨南大学
华南理工大学
华南师范大学
重庆大学
电子科技大学
四川农业大学
西南大学
云南大学
西藏大学
西安交通大学
长安大学
兰州大学
青海大学
新疆大学
中央财经大学
东华大学
南京大学
浙江大学
山东大学
华中科技大学
华中农业大学
中山大学
海南大学
四川大学
西南财经大学
西北工业大学
陕西师范大学
宁夏大学
华中师范大学
东北大学
上海外国语大学
武汉理工大学
湖南大学
西南交通大学
西北大学
广西大学
西北农林科技大学
石河子大学
贵州大学
西安电子科技大学
In [178]:
schoold
Out[178]:
{30: u'\u5317\u4eac\u5de5\u4e1a\u5927\u5b66',
31: u'\u5317\u4eac\u5927\u5b66',
32: u'\u5185\u8499\u53e4\u5927\u5b66',
33: u'\u5927\u8fde\u6d77\u4e8b\u5927\u5b66',
34: u'\u54c8\u5c14\u6ee8\u5de5\u4e1a\u5927\u5b66',
35: u'\u4e91\u5357\u5927\u5b66',
36: u'\u957f\u5b89\u5927\u5b66',
37: u'\u897f\u5317\u5927\u5b66',
38: u'\u5317\u4eac\u4ea4\u901a\u5927\u5b66',
39: u'\u5317\u4eac\u5916\u56fd\u8bed\u5927\u5b66',
41: u'\u6cb3\u5317\u5de5\u4e1a\u5927\u5b66',
42: u'\u6b66\u6c49\u5927\u5b66',
43: u'\u5317\u4eac\u6797\u4e1a\u5927\u5b66',
44: u'\u6e56\u5357\u5927\u5b66',
45: u'\u4e2d\u592e\u6c11\u65cf\u5927\u5b66',
46: u'\u4e2d\u56fd\u4eba\u6c11\u5927\u5b66',
47: u'\u5317\u4eac\u822a\u7a7a\u822a\u5929\u5927\u5b66',
48: u'\u5317\u4eac\u90ae\u7535\u5927\u5b66',
49: u'\u5317\u4eac\u4e2d\u533b\u836f\u5927\u5b66',
50: u'\u8fbd\u5b81\u5927\u5b66',
51: u'\u897f\u5357\u4ea4\u901a\u5927\u5b66',
52: u'\u5317\u4eac\u5e08\u8303\u5927\u5b66',
53: u'\u5bf9\u5916\u7ecf\u6d4e\u8d38\u6613\u5927\u5b66',
57: u'\u897f\u5b89\u7535\u5b50\u79d1\u6280\u5927\u5b66',
58: u'\u6e56\u5357\u5e08\u8303\u5927\u5b66',
59: u'\u5357\u5f00\u5927\u5b66',
60: u'\u5929\u6d25\u5927\u5b66',
61: u'\u4e2d\u56fd\u6d77\u6d0b\u5927\u5b66',
62: u'\u90d1\u5dde\u5927\u5b66',
63: u'\u5408\u80a5\u5de5\u4e1a\u5927\u5b66',
66: u'\u4e2d\u56fd\u79d1\u5b66\u6280\u672f\u5927\u5b66',
67: u'\u5b89\u5fbd\u5927\u5b66',
73: u'\u540c\u6d4e\u5927\u5b66',
74: u'\u65b0\u7586\u5927\u5b66',
76: u'\u4e0a\u6d77\u5927\u5b66',
77: u'\u5357\u4eac\u822a\u7a7a\u822a\u5929\u5927\u5b66',
78: u'\u5929\u6d25\u533b\u79d1\u5927\u5b66',
86: u'\u6c5f\u5357\u5927\u5b66',
96: u'\u5e7f\u897f\u5927\u5b66',
97: u'\u5170\u5dde\u5927\u5b66',
98: u'\u534e\u5357\u5e08\u8303\u5927\u5b66',
99: u'\u56db\u5ddd\u5927\u5b66',
100: u'\u56db\u5ddd\u519c\u4e1a\u5927\u5b66',
101: u'\u897f\u5357\u8d22\u7ecf\u5927\u5b66',
102: u'\u53a6\u95e8\u5927\u5b66',
103: u'\u798f\u5dde\u5927\u5b66',
104: u'\u4e2d\u5c71\u5927\u5b66',
105: u'\u534e\u5357\u7406\u5de5\u5927\u5b66',
106: u'\u66a8\u5357\u5927\u5b66',
107: u'\u897f\u5317\u5de5\u4e1a\u5927\u5b66',
108: u'\u5357\u660c\u5927\u5b66',
109: u'\u4e1c\u5357\u5927\u5b66',
110: u'\u4e2d\u56fd\u77ff\u4e1a\u5927\u5b66',
111: u'\u5357\u4eac\u5927\u5b66',
112: u'\u5357\u4eac\u7406\u5de5\u5927\u5b66',
113: u'\u5357\u4eac\u519c\u4e1a\u5927\u5b66',
114: u'\u6d59\u6c5f\u5927\u5b66',
115: u'\u5357\u4eac\u5e08\u8303\u5927\u5b66',
116: u'\u6cb3\u6d77\u5927\u5b66',
117: u'\u4e2d\u56fd\u836f\u79d1\u5927\u5b66',
118: u'\u82cf\u5dde\u5927\u5b66',
119: u'\u91cd\u5e86\u5927\u5b66',
122: u'\u5409\u6797\u5927\u5b66',
123: u'\u4e2d\u5357\u5927\u5b66',
124: u'\u54c8\u5c14\u6ee8\u5de5\u7a0b\u5927\u5b66',
125: u'\u4e0a\u6d77\u4ea4\u901a\u5927\u5b66',
126: u'\u5c71\u4e1c\u5927\u5b66',
127: u'\u534e\u4e2d\u79d1\u6280\u5927\u5b66',
128: u'\u6b66\u6c49\u7406\u5de5\u5927\u5b66',
130: u'\u4e0a\u6d77\u8d22\u7ecf\u5927\u5b66',
131: u'\u534e\u4e1c\u5e08\u8303\u5927\u5b66',
132: u'\u590d\u65e6\u5927\u5b66',
133: u'\u534e\u4e1c\u7406\u5de5\u5927\u5b66',
134: u'\u4e1c\u5317\u5927\u5b66',
135: u'\u4e1c\u534e\u5927\u5b66',
136: u'\u4e0a\u6d77\u5916\u56fd\u8bed\u5927\u5b66',
137: u'\u4e1c\u5317\u519c\u4e1a\u5927\u5b66',
138: u'\u5927\u8fde\u7406\u5de5\u5927\u5b66',
139: u'\u592a\u539f\u7406\u5de5\u5927\u5b66',
140: u'\u6e05\u534e\u5927\u5b66',
142: u'\u4e1c\u5317\u5e08\u8303\u5927\u5b66',
143: u'\u5317\u4eac\u7406\u5de5\u5927\u5b66',
144: u'\u5317\u4eac\u79d1\u6280\u5927\u5b66',
199: u'\u77f3\u6cb3\u5b50\u5927\u5b66',
330: u'\u897f\u5b89\u4ea4\u901a\u5927\u5b66',
332: u'\u897f\u5317\u519c\u6797\u79d1\u6280\u5927\u5b66',
334: u'\u9655\u897f\u5e08\u8303\u5927\u5b66',
364: u'\u897f\u85cf\u5927\u5b66',
367: u'\u9752\u6d77\u5927\u5b66',
414: u'\u4e2d\u5357\u8d22\u7ecf\u653f\u6cd5\u5927\u5b66',
417: u'\u534e\u4e2d\u519c\u4e1a\u5927\u5b66',
419: u'\u4e1c\u5317\u6797\u4e1a\u5927\u5b66',
420: u'\u534e\u4e2d\u5e08\u8303\u5927\u5b66',
504: u'\u6d77\u5357\u5927\u5b66',
544: u'\u5b81\u590f\u5927\u5b66',
556: u'\u5317\u4eac\u5316\u5de5\u5927\u5b66',
557: u'\u4e2d\u56fd\u519c\u4e1a\u5927\u5b66',
558: u'\u4e2d\u56fd\u4f20\u5a92\u5927\u5b66',
566: u'\u4e2d\u592e\u8d22\u7ecf\u5927\u5b66',
569: u'\u4e2d\u56fd\u653f\u6cd5\u5927\u5b66',
661: u'\u7535\u5b50\u79d1\u6280\u5927\u5b66',
831: u'\u534e\u5317\u7535\u529b\u5927\u5b66',
866: u'\u5317\u4eac\u4f53\u80b2\u5927\u5b66',
934: u'\u897f\u5357\u5927\u5b66',
935: u'\u8d35\u5dde\u5927\u5b66'}
In [175]:
schooli = score211f.columns.tolist()
In [184]:
us = {}
for i in range(len(u)):
us[schoold[int(schooli[i])]] = u[i]
In [185]:
us
Out[185]:
{u'\u4e0a\u6d77\u4ea4\u901a\u5927\u5b66': 0.011140064959194253,
u'\u4e0a\u6d77\u5916\u56fd\u8bed\u5927\u5b66': 0.01041024271404681,
u'\u4e0a\u6d77\u5927\u5b66': 0.010019428170856806,
u'\u4e0a\u6d77\u8d22\u7ecf\u5927\u5b66': 0.01074240454454296,
u'\u4e1c\u5317\u519c\u4e1a\u5927\u5b66': 0.009203274288002149,
u'\u4e1c\u5317\u5927\u5b66': 0.0098052732501449844,
u'\u4e1c\u5317\u5e08\u8303\u5927\u5b66': 0.0096424435559260575,
u'\u4e1c\u5317\u6797\u4e1a\u5927\u5b66': 0.0093283959164428849,
u'\u4e1c\u534e\u5927\u5b66': 0.0097124487909960519,
u'\u4e1c\u5357\u5927\u5b66': 0.010363452619660471,
u'\u4e2d\u5357\u5927\u5b66': 0.010214537680445739,
u'\u4e2d\u5357\u8d22\u7ecf\u653f\u6cd5\u5927\u5b66': 0.010197530941928762,
u'\u4e2d\u56fd\u4eba\u6c11\u5927\u5b66': 0.01107966135913196,
u'\u4e2d\u56fd\u4f20\u5a92\u5927\u5b66': 0.010292598384914762,
u'\u4e2d\u56fd\u519c\u4e1a\u5927\u5b66': 0.01002112356022236,
u'\u4e2d\u56fd\u653f\u6cd5\u5927\u5b66': 0.010495881321468318,
u'\u4e2d\u56fd\u6d77\u6d0b\u5927\u5b66': 0.0099632116488328672,
u'\u4e2d\u56fd\u77ff\u4e1a\u5927\u5b66': 0.009585398897075487,
u'\u4e2d\u56fd\u79d1\u5b66\u6280\u672f\u5927\u5b66': 0.0098346812711759459,
u'\u4e2d\u56fd\u836f\u79d1\u5927\u5b66': 0.0098803086186658885,
u'\u4e2d\u592e\u6c11\u65cf\u5927\u5b66': 0.0098283584665416028,
u'\u4e2d\u592e\u8d22\u7ecf\u5927\u5b66': 0.01076185044148744,
u'\u4e2d\u5c71\u5927\u5b66': 0.010699832988109396,
u'\u4e91\u5357\u5927\u5b66': 0.009552114493065901,
u'\u5170\u5dde\u5927\u5b66': 0.0098568298062331906,
u'\u5185\u8499\u53e4\u5927\u5b66': 0.0088620260693047567,
u'\u5317\u4eac\u4e2d\u533b\u836f\u5927\u5b66': 0.010135706829808419,
u'\u5317\u4eac\u4ea4\u901a\u5927\u5b66': 0.010183243123894665,
u'\u5317\u4eac\u4f53\u80b2\u5927\u5b66': 0.0094693074375509726,
u'\u5317\u4eac\u5316\u5de5\u5927\u5b66': 0.0097624088793884494,
u'\u5317\u4eac\u5916\u56fd\u8bed\u5927\u5b66': 0.010517187388415719,
u'\u5317\u4eac\u5927\u5b66': 0.011296686157090308,
u'\u5317\u4eac\u5de5\u4e1a\u5927\u5b66': 0.0097555234657391004,
u'\u5317\u4eac\u5e08\u8303\u5927\u5b66': 0.010507561646184565,
u'\u5317\u4eac\u6797\u4e1a\u5927\u5b66': 0.0098074209073839708,
u'\u5317\u4eac\u7406\u5de5\u5927\u5b66': 0.010441013096695713,
u'\u5317\u4eac\u79d1\u6280\u5927\u5b66': 0.0099849252380233358,
u'\u5317\u4eac\u822a\u7a7a\u822a\u5929\u5927\u5b66': 0.010482915125301664,
u'\u5317\u4eac\u90ae\u7535\u5927\u5b66': 0.010169853055121357,
u'\u534e\u4e1c\u5e08\u8303\u5927\u5b66': 0.010347879749434767,
u'\u534e\u4e1c\u7406\u5de5\u5927\u5b66': 0.0098782515250773369,
u'\u534e\u4e2d\u5e08\u8303\u5927\u5b66': 0.0097490641173139016,
u'\u534e\u4e2d\u79d1\u6280\u5927\u5b66': 0.010350751847247885,
u'\u534e\u5317\u7535\u529b\u5927\u5b66': 0.010153610403520882,
u'\u534e\u5357\u5e08\u8303\u5927\u5b66': 0.0097813431992943931,
u'\u5357\u4eac\u519c\u4e1a\u5927\u5b66': 0.0095633280862469049,
u'\u5357\u4eac\u5927\u5b66': 0.010945470069332049,
u'\u5357\u4eac\u5e08\u8303\u5927\u5b66': 0.0096738059135334058,
u'\u5357\u4eac\u7406\u5de5\u5927\u5b66': 0.0098928904138509254,
u'\u5357\u4eac\u822a\u7a7a\u822a\u5929\u5927\u5b66': 0.0099859366185302018,
u'\u5357\u5f00\u5927\u5b66': 0.010708424478904773,
u'\u5357\u660c\u5927\u5b66': 0.0096063142755705311,
u'\u53a6\u95e8\u5927\u5b66': 0.010645931422021686,
u'\u5408\u80a5\u5de5\u4e1a\u5927\u5b66': 0.0096637346737199429,
u'\u540c\u6d4e\u5927\u5b66': 0.010698866191469859,
u'\u54c8\u5c14\u6ee8\u5de5\u4e1a\u5927\u5b66': 0.010268694384304861,
u'\u54c8\u5c14\u6ee8\u5de5\u7a0b\u5927\u5b66': 0.009667811427090698,
u'\u56db\u5ddd\u519c\u4e1a\u5927\u5b66': 0.0094045163716619824,
u'\u56db\u5ddd\u5927\u5b66': 0.010367534542074164,
u'\u590d\u65e6\u5927\u5b66': 0.011149772851804813,
u'\u5927\u8fde\u6d77\u4e8b\u5927\u5b66': 0.0096351044183221948,
u'\u5927\u8fde\u7406\u5de5\u5927\u5b66': 0.0099810787699454295,
u'\u5929\u6d25\u533b\u79d1\u5927\u5b66': 0.0098101547955639669,
u'\u5929\u6d25\u5927\u5b66': 0.010401486188872168,
u'\u5b81\u590f\u5927\u5b66': 0.0092108597932755634,
u'\u5b89\u5fbd\u5927\u5b66': 0.0095783811070434197,
u'\u5bf9\u5916\u7ecf\u6d4e\u8d38\u6613\u5927\u5b66': 0.010705894886168386,
u'\u5c71\u4e1c\u5927\u5b66': 0.010318810957081068,
u'\u5e7f\u897f\u5927\u5b66': 0.0093324737548129873,
u'\u65b0\u7586\u5927\u5b66': 0.0086630110617673985,
u'\u66a8\u5357\u5927\u5b66': 0.010156460627534182,
u'\u6b66\u6c49\u5927\u5b66': 0.010623953357133828,
u'\u6b66\u6c49\u7406\u5de5\u5927\u5b66': 0.0098848609304352866,
u'\u6c5f\u5357\u5927\u5b66': 0.0097357261957205597,
u'\u6cb3\u5317\u5de5\u4e1a\u5927\u5b66': 0.0095350438217471425,
u'\u6cb3\u6d77\u5927\u5b66': 0.009815825094498333,
u'\u6d59\u6c5f\u5927\u5b66': 0.010849501969484577,
u'\u6d77\u5357\u5927\u5b66': 0.0093128540106476431,
u'\u6e05\u534e\u5927\u5b66': 0.011441501603551603,
u'\u6e56\u5357\u5927\u5b66': 0.010225552465216739,
u'\u6e56\u5357\u5e08\u8303\u5927\u5b66': 0.0095749129563526998,
u'\u7535\u5b50\u79d1\u6280\u5927\u5b66': 0.0099685900898396594,
u'\u77f3\u6cb3\u5b50\u5927\u5b66': 0.0090835149917455581,
u'\u798f\u5dde\u5927\u5b66': 0.0097508119807711933,
u'\u82cf\u5dde\u5927\u5b66': 0.010012406812894526,
u'\u897f\u5317\u519c\u6797\u79d1\u6280\u5927\u5b66': 0.0096266297472876339,
u'\u897f\u5317\u5927\u5b66': 0.0097197799934966665,
u'\u897f\u5357\u4ea4\u901a\u5927\u5b66': 0.0099126262352779819,
u'\u897f\u5357\u5927\u5b66': 0.0096739449182146713,
u'\u897f\u5357\u8d22\u7ecf\u5927\u5b66': 0.01040652082406144,
u'\u897f\u5b89\u4ea4\u901a\u5927\u5b66': 0.010383498595435931,
u'\u897f\u5b89\u7535\u5b50\u79d1\u6280\u5927\u5b66': 0.0096892839776332122,
u'\u897f\u85cf\u5927\u5b66': 0.0092778693745307408,
u'\u8d35\u5dde\u5927\u5b66': 0.0093484287745769432,
u'\u8fbd\u5b81\u5927\u5b66': 0.0095236369071646371,
u'\u90d1\u5dde\u5927\u5b66': 0.0096244348499457608,
u'\u91cd\u5e86\u5927\u5b66': 0.010210443241618759,
u'\u957f\u5b89\u5927\u5b66': 0.0097156398617498328,
u'\u9655\u897f\u5e08\u8303\u5927\u5b66': 0.0095602980982037577,
u'\u9752\u6d77\u5927\u5b66': 0.0092071322893540735}
In [186]:
uss = sorted(us.items(),key = lambda item:item[1],reverse=True)
In [187]:
for k,v in uss:
print k,v
清华大学 0.0114415016036
北京大学 0.0112966861571
复旦大学 0.0111497728518
上海交通大学 0.0111400649592
中国人民大学 0.0110796613591
南京大学 0.0109454700693
浙江大学 0.0108495019695
中央财经大学 0.0107618504415
上海财经大学 0.0107424045445
南开大学 0.0107084244789
对外经济贸易大学 0.0107058948862
中山大学 0.0106998329881
同济大学 0.0106988661915
厦门大学 0.010645931422
武汉大学 0.0106239533571
北京外国语大学 0.0105171873884
北京师范大学 0.0105075616462
中国政法大学 0.0104958813215
北京航空航天大学 0.0104829151253
北京理工大学 0.0104410130967
上海外国语大学 0.010410242714
西南财经大学 0.0104065208241
天津大学 0.0104014861889
西安交通大学 0.0103834985954
四川大学 0.0103675345421
东南大学 0.0103634526197
华中科技大学 0.0103507518472
华东师范大学 0.0103478797494
山东大学 0.0103188109571
中国传媒大学 0.0102925983849
哈尔滨工业大学 0.0102686943843
湖南大学 0.0102255524652
中南大学 0.0102145376804
重庆大学 0.0102104432416
中南财经政法大学 0.0101975309419
北京交通大学 0.0101832431239
北京邮电大学 0.0101698530551
暨南大学 0.0101564606275
华北电力大学 0.0101536104035
北京中医药大学 0.0101357068298
中国农业大学 0.0100211235602
上海大学 0.0100194281709
苏州大学 0.0100124068129
南京航空航天大学 0.00998593661853
北京科技大学 0.00998492523802
大连理工大学 0.00998107876995
电子科技大学 0.00996859008984
中国海洋大学 0.00996321164883
西南交通大学 0.00991262623528
南京理工大学 0.00989289041385
武汉理工大学 0.00988486093044
中国药科大学 0.00988030861867
华东理工大学 0.00987825152508
兰州大学 0.00985682980623
中国科学技术大学 0.00983468127118
中央民族大学 0.00982835846654
河海大学 0.0098158250945
天津医科大学 0.00981015479556
北京林业大学 0.00980742090738
东北大学 0.00980527325014
华南师范大学 0.00978134319929
北京化工大学 0.00976240887939
北京工业大学 0.00975552346574
福州大学 0.00975081198077
华中师范大学 0.00974906411731
江南大学 0.00973572619572
西北大学 0.0097197799935
长安大学 0.00971563986175
东华大学 0.009712448791
西安电子科技大学 0.00968928397763
西南大学 0.00967394491821
南京师范大学 0.00967380591353
哈尔滨工程大学 0.00966781142709
合肥工业大学 0.00966373467372
东北师范大学 0.00964244355593
大连海事大学 0.00963510441832
西北农林科技大学 0.00962662974729
郑州大学 0.00962443484995
南昌大学 0.00960631427557
中国矿业大学 0.00958539889708
安徽大学 0.00957838110704
湖南师范大学 0.00957491295635
南京农业大学 0.00956332808625
陕西师范大学 0.0095602980982
云南大学 0.00955211449307
河北工业大学 0.00953504382175
辽宁大学 0.00952363690716
北京体育大学 0.00946930743755
四川农业大学 0.00940451637166
贵州大学 0.00934842877458
广西大学 0.00933247375481
东北林业大学 0.00932839591644
海南大学 0.00931285401065
西藏大学 0.00927786937453
宁夏大学 0.00921085979328
青海大学 0.00920713228935
东北农业大学 0.009203274288
石河子大学 0.00908351499175
内蒙古大学 0.0088620260693
新疆大学 0.00866301106177
In [ ]:
Content source: phiedulxp/quora-mining
Similar notebooks: