I have used reticulate
package to source python code in R.
source_python("data_loading.py")
df = my_data()
str(df)
'data.frame': 268 obs. of 13 variables:
$ DKF: num 1.352 1.283 1.246 0.73 0.784 ...
$ GDT: num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ...
$ GSB: num 1.427 1.366 1.162 0.785 0.742 ...
$ HKZ: num 1.355 1.495 1.211 0.807 0.927 ...
$ SLG: num 1.549 1.542 1.228 0.632 0.716 ...
$ SRL: num 2.059 1.379 1.751 0.845 1.205 ...
$ UAB: num 1.555 1.51 1.007 0.904 0.447 ...
$ UKE: num 1.269 1.449 1.122 0.97 0.858 ...
$ UKF: num 1.325 1.483 1.172 0.972 0.852 ...
$ UOR: num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ...
$ UTH: num 1.336 1.499 1.149 0.974 0.875 ...
$ WH1: num 1.48 1.466 1.191 0.762 0.657 ...
$ WH3: num 1.434 1.385 1.154 0.781 0.661 ...
- attr(*, "pandas.index")=MultiIndex([(2000, 1),
(2000, 2),
(2000, 3),
(2000, 4),
(2000, 5),
(2000, 6),
(2000, 7),
(2000, 8),
(2000, 9),
(2000, 10),
...
(2021, 7),
(2021, 8),
(2021, 9),
(2021, 10),
(2021, 11),
(2021, 12),
(2022, 1),
(2022, 2),
(2022, 3),
(2022, 4)],
names=['year', 'month'], length=268)
I don't know how to access the indexes (pandas.index) in the R dataframe object ! I would like to be able to plot the data by grouping by year and month.
Data in python environment look like :
df = {'DKF': {(2000, 1): 1.3517226474709378, (2000, 2): 1.2830496825194315, (2000, 3): 1.2455233121831182, (2000, 4): 0.7299107400424064, (2000, 5): 0.7835659509257843, (2000, 6): 0.9378139543942825, (2000, 7): 0.6590645941762302, (2000, 8): 0.6744555183919568, (2000, 9): 1.0028705091347772, (2000, 10): 0.9667005317835341, (2000, 11): 1.0678912258546405, (2000, 12): 0.9112284147742452, (2001, 1): 0.8881925577638216, (2001, 2): 1.0094984492846548, (2001, 3): 0.9234818764810746, (2001, 4): 0.8256952570446592, (2001, 5): 0.7823148556967823, (2001, 6): 0.58656187528325, (2001, 7): 0.5986398301438705, (2001, 8): 0.9152977641105378, (2001, 9): 0.7957461362888425, (2001, 10): 1.2289233852664525, (2001, 11): 1.215903707002575, (2001, 12): 0.9411119504485526, (2002, 1): 1.253743089309995, (2002, 2): 1.3771820959703505, (2002, 3): 1.1458998591562888, (2002, 4): 0.780148229684933, (2002, 5): 0.8745953536826678, (2002, 6): 1.14604519185711, (2002, 7): 0.9925386650483022, (2002, 8): 0.8395810391153705, (2002, 9): 0.6922482171262826, (2002, 10): 1.0927541758198784, (2002, 11): 0.9355095991032771, (2002, 12): 1.0512662479817905, (2003, 1): 1.2138933498346607, (2003, 2): 0.47180505624826446, (2003, 3): 0.8997961889216146, (2003, 4): 1.1346551380638876}, 'GDT': {(2000, 1): nan, (2000, 2): nan, (2000, 3): nan, (2000, 4): nan, (2000, 5): nan, (2000, 6): nan, (2000, 7): nan, (2000, 8): nan, (2000, 9): nan, (2000, 10): nan, (2000, 11): nan, (2000, 12): nan, (2001, 1): nan, (2001, 2): nan, (2001, 3): nan, (2001, 4): nan, (2001, 5): nan, (2001, 6): nan, (2001, 7): nan, (2001, 8): nan, (2001, 9): nan, (2001, 10): nan, (2001, 11): nan, (2001, 12): nan, (2002, 1): 1.256807526788879, (2002, 2):
1.3045873333521896, (2002, 3): 1.0922871367435592, (2002, 4): 0.7311444028087076, (2002, 5): 0.9018008043140232, (2002, 6): 0.957461410038454, (2002, 7): 0.8197060450786827, (2002, 8): 0.47577545253187387, (2002, 9): 0.8128263280942774, (2002, 10): 1.1168799254163093, (2002, 11): 0.9324831606889018, (2002, 12): 1.3286891013558542, (2003, 1): 1.2538435349279176, (2003, 2): 0.6461925212429451, (2003, 3): 0.8513379444813536, (2003, 4): 1.0889167190287157}, 'GSB': {(2000, 1): 1.427328551728886, (2000, 2): 1.3664731294718808, (2000, 3): 1.1615089781365158, (2000, 4): 0.7851300114287154, (2000, 5): 0.7422343232255912, (2000, 6): 1.031580853170691, (2000, 7): 0.7242493688325659, (2000, 8): 0.5766162898393684, (2000, 9): 1.0332126497783654, (2000, 10): 1.1857205460845148, (2000, 11): 1.366502815093195, (2000, 12): 1.157381956346292, (2001, 1): 0.9902549635833164, (2001, 2): 0.9724394327156028, (2001, 3): 1.048815013697255, (2001, 4): 0.8273478915528274, (2001, 5): 0.7430593714405965, (2001, 6): 0.7536324648475042, (2001, 7): 0.6349134921464644, (2001, 8): 0.7826830215295701, (2001, 9): 1.0233964167323912, (2001, 10): 1.412918707213485, (2001, 11): 1.260580991090124, (2001, 12): 0.9576845313512137, (2002, 1): 1.2652569266159417, (2002, 2): 1.3065244634866244, (2002, 3): 1.0856890909647214, (2002, 4): 0.7318101398049849, (2002, 5): 0.9215182854866718, (2002, 6): 0.9534957346958998, (2002, 7): 0.8107925205416322, (2002, 8): 0.4734280417496323, (2002, 9): 0.7966062482404612, (2002, 10): 1.1170454368296987, (2002, 11): 0.9322063873084222, (2002, 12): 1.32238691545603, (2003, 1): 1.2531210790686047, (2003, 2): 0.6576300158329207, (2003, 3): 0.8389175666051795, (2003, 4): 1.0881232197385742}, 'HKZ': {(2000, 1): 1.3554525362480663, (2000, 2): 1.4951631344657137, (2000, 3): 1.2105681636598593, (2000, 4): 0.8072930444495694, (2000, 5): 0.926977008767427, (2000, 6): 0.8022017476928317, (2000, 7): 0.69652277417082, (2000, 8): 0.456583016223536, (2000, 9): 0.8919032946330773, (2000, 10): 1.349532169190594, (2000, 11): 1.5861420749020783, (2000, 12): 1.4914960612718604, (2001, 1): 1.1734639773151045, (2001, 2): 0.9458568945260551, (2001, 3): 1.0691427569966114, (2001, 4): 1.1488059357249147, (2001, 5): 1.0912434760028036, (2001, 6): 0.7592430266062555, (2001, 7): 0.7202558342474065, (2001, 8): 0.7608615824541107, (2001, 9): 1.1328043102045258, (2001, 10): 1.4500451856634633, (2001, 11): 1.0657649898420833, (2001, 12): 1.1213623436385283, (2002, 1): 1.2927673511490292, (2002, 2): 1.5212939742846794, (2002, 3): 0.9924934326785696, (2002, 4): 0.9566700271565793, (2002, 5): 1.0323873124589016, (2002, 6): 0.7476240350020518, (2002, 7): 0.9040117274509223, (2002, 8): 0.39706056802306583, (2002, 9): 0.6625794086698624, (2002, 10): 1.1662353900999265, (2002, 11): 0.9919567773693077, (2002, 12): 1.1606766246913955, (2003, 1): 1.4024781315822306, (2003, 2): 0.8526080709173501, (2003, 3): 0.825425230187763, (2003, 4): 1.0372282355745681}, 'SLG': {(2000, 1): 1.5487504409690902, (2000, 2): 1.5415838472843555, (2000, 3): 1.2282126578372121, (2000, 4): 0.632444048068446, (2000, 5):
0.7158862148925723, (2000, 6): 0.8454897104320542, (2000, 7): 0.4551865318931529, (2000, 8): 0.5826158644517344, (2000, 9): 0.9977976362941181, (2000, 10): 1.138989723113055, (2000, 11): 1.0930164859430511, (2000, 12): 0.8898335222651087, (2001, 1): 0.8842004763468283, (2001, 2): 1.0275628718138945, (2001, 3): 0.8746407345516105, (2001, 4): 0.7131039098650879, (2001, 5): 0.6837954767731654, (2001, 6): 0.4790985831081878, (2001, 7): 0.4988440876977696, (2001, 8): 0.8223209745844613, (2001, 9): 0.7417117336660771, (2001, 10): 1.3284354806383687, (2001, 11): 1.3409613738776682, (2001, 12): 0.9324083887988991, (2002, 1): 1.4379027571945358, (2002, 2): 1.7433696218646755, (2002, 3): 1.2750778360525403, (2002, 4): 0.5842975310863218, (2002, 5): 0.7145673671783507, (2002, 6): 1.1216530700131497, (2002, 7): 0.7555671720037355, (2002, 8): 0.6588768243045798, (2002, 9): 0.584884861123621, (2002, 10): 1.1539708804408706, (2002, 11): 0.9312319138226935, (2002, 12): 1.0305200250483402, (2003, 1): 1.3855526535671203, (2003, 2): 0.4802953659778654, (2003, 3): 0.8327866009478592, (2003, 4): 1.0896804098036148}, 'SRL': {(2000,
1): 2.0594032935476854, (2000, 2): 1.3791095262556443, (2000, 3): 1.7505922447857718, (2000, 4): 0.8446108545729051, (2000, 5): 1.2051921061573831, (2000, 6): 1.010183601066476, (2000, 7): 0.6508079260726014, (2000, 8): 0.7407540065635136, (2000, 9): 0.8294641525482448, (2000, 10): 1.136002398465397, (2000, 11): 0.7332513652958302, (2000, 12): 0.7179854954011051, (2001, 1): 1.2405938678639528, (2001, 2): 1.3443045113742507, (2001, 3): 0.6103847170941851, (2001, 4): 0.7889614738491562, (2001, 5): 0.8836293099223432, (2001, 6): 0.6398611202963761, (2001, 7): 0.9101469931017445, (2001, 8): 0.7110037038066164, (2001, 9): 0.6944426634848774, (2001, 10): 0.743163322298458, (2001, 11): 1.641550980464115, (2001, 12): 1.3732158510392996, (2002, 1): 1.5435232330958792, (2002, 2): 1.2671850986946984, (2002, 3): 1.0342041708473233, (2002, 4): 0.7413588349552598, (2002, 5): 0.6662992151308426, (2002, 6): 0.42994912796486, (2002, 7): 0.4614513838546502, (2002, 8): 0.33740401239093476, (2002, 9): 1.0786288336533776, (2002, 10): 0.7201737273806963, (2002, 11): 0.7295008767212589, (2002, 12): 1.1650001638656944, (2003, 1): 1.3133849508688604, (2003, 2): 1.2843906275766657, (2003, 3): 1.7162898530793824, (2003, 4): 0.8887775424337104}, 'UAB': {(2000, 1): 1.554890436351146, (2000, 2): 1.5095900904911665, (2000, 3): 1.0071870623725239, (2000, 4): 0.90356286432306, (2000, 5): 0.4465354831707406, (2000, 6): 0.7661408912717084, (2000, 7): 0.5077752357230882, (2000, 8): 0.3953245353667669, (2000, 9): 0.9392679381098866, (2000, 10): 1.3380420085685858, (2000, 11): 1.0678858961974096, (2000, 12): 1.4888333841570116, (2001, 1): 0.9310731584491987, (2001, 2): 1.23831178634754, (2001, 3): 1.0869269288933887, (2001, 4): 1.0308784345088216, (2001, 5): 0.35816971016021937, (2001, 6): 0.7424053638684773, (2001, 7): 0.5807096459444877, (2001, 8): 0.59610372872468, (2001, 9): 1.041214912761702, (2001, 10): 1.5274150222159848, (2001, 11): 1.0127948462369876, (2001, 12): 1.2298052365051528, (2002, 1): 1.3749320279589967, (2002, 2): 1.1748243056243677, (2002, 3): 1.2195563075988665, (2002, 4): 0.8655470797340363, (2002, 5): 0.9279975373039556, (2002, 6): 1.010587765336004, (2002, 7): 0.3876746609412122, (2002, 8): 0.6273582470414101, (2002, 9): 0.5008568258056315, (2002, 10): 1.237209343982918, (2002, 11): 1.4064113075563864, (2002, 12): 1.1152126487756142, (2003, 1): 1.4878686046714453, (2003, 2): 1.2739834005782047, (2003, 3): 0.9862452377520529, (2003, 4): 0.6976324874080646}, 'UKE': {(2000, 1): 1.2689103271741642, (2000, 2): 1.448850876836714, (2000, 3): 1.1215747148313229, (2000, 4): 0.9697809286187101, (2000, 5): 0.8580554214102996, (2000, 6): 0.7055802545680286, (2000, 7): 0.569177769555276, (2000, 8): 0.5093118817682774, (2000, 9): 0.9217522030201674, (2000, 10): 1.2829829181484778, (2000, 11): 1.37989309039233, (2000, 12): 1.4692246015519577, (2001, 1): 1.2514806457756777, (2001, 2): 0.9622779992784523, (2001, 3): 1.1523632901686611, (2001, 4): 1.170899452345576, (2001, 5): 0.8924892052905243, (2001, 6): 0.6389294687842351, (2001, 7): 0.6533905745080162, (2001, 8): 0.718973320926109, (2001, 9): 1.0480403777450924, (2001, 10): 1.4336148798358987, (2001, 11): 1.0187400631716952, (2001, 12): 1.2025621345600492, (2002, 1): 1.41115713291571, (2002, 2): 1.7419895139140342, (2002, 3): 0.9845770676939698, (2002, 4): 1.0031594716517345, (2002, 5): 1.1751386096650493, (2002, 6): 0.6471700368073762, (2002, 7): 0.6470519297198025, (2002, 8): 0.32799519360372364, (2002, 9): 0.6818357988453819, (2002, 10): 1.0383455732558626, (2002, 11): 1.1494409536769357, (2002, 12): 1.3192795655449814, (2003, 1): 1.6602002396523663, (2003, 2): 0.9006465583294068, (2003, 3): 0.9067321375346832, (2003, 4): 0.9961612972679239}, 'UKF': {(2000, 1): 1.3249433826076369, (2000, 2): 1.4834390048790316, (2000, 3): 1.1720744005021664, (2000, 4): 0.9721227613412933, (2000, 5): 0.8515448592728304, (2000, 6): 0.6193634003508302, (2000, 7): 0.5370454750545013, (2000, 8): 0.43042095662362834, (2000, 9): 0.8263760497346081, (2000, 10): 1.3281730350770156, (2000, 11): 1.4011761926628954, (2000, 12): 1.6555818191216964, (2001, 1): 1.3357608146005617, (2001, 2): 1.034198046367072, (2001, 3): 1.121260727670918, (2001, 4): 1.126124763713561, (2001, 5): 0.8756813654921048, (2001, 6): 0.5645819016595045, (2001, 7): 0.6105116367301959, (2001, 8): 0.6219140873691195, (2001, 9): 1.051983907255014, (2001, 10): 1.39389121228373, (2001, 11): 1.0481969547160257, (2001, 12): 1.2687238324230548, (2002, 1): 1.5254562990321106, (2002, 2): 2.051792727712291, (2002, 3): 1.0025016594272602, (2002, 4): 1.0659149467240578, (2002, 5): 1.1244210818495683, (2002, 6): 0.5315380292328106, (2002, 7): 0.5749383603397371, (2002, 8): 0.2885568506939066, (2002, 9): 0.6685273721263465, (2002, 10): 1.0808780812122165, (2002, 11): 1.0930127690879337, (2002, 12): 1.3422979556904777, (2003, 1): 1.7777334775059637, (2003, 2): 0.8524602861172142, (2003, 3): 0.9132216671993684, (2003, 4): 1.0135032567751208}, 'UOR': {(2000, 1): nan, (2000, 2): nan, (2000, 3): nan, (2000, 4): nan, (2000, 5): nan, (2000, 6): nan, (2000, 7): nan, (2000, 8): nan, (2000, 9): nan, (2000, 10): nan, (2000, 11): nan, (2000, 12): nan, (2001, 1): nan, (2001, 2): nan, (2001, 3): nan, (2001, 4): nan, (2001, 5): nan, (2001, 6): nan, (2001, 7): nan, (2001, 8): nan, (2001, 9): nan, (2001, 10): nan, (2001, 11): nan, (2001, 12): nan, (2002, 1): 1.568196798031884, (2002, 2): 1.6355130591248717, (2002, 3): 1.1190957069138054, (2002, 4): 0.8733079573257021, (2002, 5): 1.1104032676426743, (2002, 6): 1.0014213082673353, (2002, 7): 0.46462779835652446, (2002, 8): 0.43754519044744683, (2002, 9): 0.34292019892534936, (2002, 10): 1.1210636145981827, (2002, 11): 1.332485106490388, (2002, 12): 1.2229630481992118, (2003, 1): 1.508984812821176, (2003, 2): 1.1887845201515987, (2003, 3): 0.8611108497973553, (2003, 4): 0.9059291273938993}, 'UTH': {(2000, 1): 1.3359812952143335, (2000, 2): 1.4988411220343303, (2000, 3): 1.1487175960792586, (2000, 4): 0.9738685779965163, (2000, 5): 0.8745674941392821, (2000, 6): 0.6443392124290698, (2000, 7): 0.5668678025838506, (2000, 8): 0.436425063880557, (2000, 9): 0.8719463874510108, (2000, 10): 1.3778434744682042, (2000, 11): 1.500864165719369, (2000, 12): 1.5967169053821837, (2001, 1): 1.3473679073576996, (2001, 2): 1.0010888072264865, (2001, 3): 1.1149274936810654, (2001, 4): 1.1446113967153915, (2001, 5): 0.9704882177138088, (2001, 6): 0.5855553430495062, (2001, 7): 0.6431702098251845,
(2001, 8): 0.6673872030730853, (2001, 9): 1.0184462652370758, (2001, 10): 1.421874247940507, (2001, 11): 1.0718512105705393, (2001, 12): 1.2613274250630966, (2002, 1): 1.4613909819098134, (2002, 2): 1.9547228219671733, (2002, 3): 0.9969535824706017, (2002, 4): 1.0390713222466403, (2002, 5): 1.1405910444641447, (2002, 6): 0.5816438797339953, (2002, 7): 0.6358023493332612, (2002, 8): 0.28488584160071145, (2002, 9): 0.6864525632252447, (2002, 10): 1.0811011952357756, (2002, 11): 1.1342053981023652, (2002, 12): 1.3175258026284367, (2003, 1): 1.7155125770519015,
(2003, 2): 0.8655302690735893, (2003, 3): 0.9004624256328815, (2003, 4): 1.0362839133127566}, 'WH1': {(2000, 1): 1.479678096243991, (2000, 2): 1.4655890964853133, (2000, 3): 1.1907311408382424, (2000, 4): 0.7624104192520295, (2000, 5): 0.6570086687440684, (2000, 6): 1.0220573194773563, (2000, 7): 0.7128320531734508, (2000, 8): 0.5808600771066151, (2000, 9): 1.0547152354298281, (2000, 10): 1.225085170050707, (2000, 11): 1.4736262369880635, (2000, 12): 1.1945189658959103, (2001, 1): 1.0201317967474317, (2001, 2): 1.012860123046342, (2001, 3): 0.9979750061138811, (2001, 4): 0.7657471321151421, (2001, 5): 0.6834537983986184, (2001, 6): 0.7291585577119047, (2001, 7): 0.546398452720382, (2001, 8): 0.7511935928668964, (2001, 9): 0.9255563657580868, (2001, 10): 1.504270396795507, (2001, 11): 1.3057348102285011, (2001, 12): 0.95159456191817, (2002, 1): 1.343115697136973, (2002, 2): 1.458869255883179, (2002, 3): 1.1351981097654034, (2002, 4): 0.6741782716236064, (2002, 5): 0.8381647865673924, (2002, 6): 0.943335749690483, (2002, 7): 0.7771730299735837, (2002, 8): 0.44638095117997273, (2002, 9): 0.8030759725471737, (2002, 10): 1.119470100075558, (2002, 11): 0.8945063067825321, (2002, 12): 1.259814754626267, (2003, 1): 1.346474717311829, (2003, 2): 0.5614396933726116, (2003, 3): 0.9001633009379663, (2003, 4): 1.073275299867811}, 'WH3': {(2000, 1): 1.4338343574503027, (2000, 2): 1.384953627743628, (2000, 3): 1.1535912277947202, (2000, 4): 0.7809206933722733, (2000, 5): 0.6605269426785618, (2000, 6): 1.0027970510744195, (2000, 7): 0.745909465377024, (2000, 8): 0.6482779349782384, (2000, 9): 1.072484454331807, (2000, 10): 1.184206133353829, (2000, 11): 1.37061783182705, (2000, 12): 1.1447962269107579, (2001, 1): 1.0056652795344019, (2001, 2): 1.0245671990470344, (2001, 3): 1.0022481060568582, (2001, 4): 0.7777726845228051, (2001, 5): 0.7053399171788303, (2001, 6): 0.7832286207773255, (2001, 7): 0.5623766087315936, (2001, 8): 0.7462191387020645, (2001, 9): 0.9638196538715932, (2001, 10): 1.4669122980607163, (2001, 11): 1.2973547468521627, (2001, 12): 0.9414453931278712, (2002, 1): 1.2898967228235176, (2002, 2): 1.3607244135464809, (2002, 3): 1.1432591220278236, (2002, 4): 0.7083203488460438, (2002, 5): 0.8652599449264562, (2002, 6): 0.9549555936338141, (2002, 7): 0.7822433450003142, (2002, 8): 0.4705431907982273, (2002, 9): 0.850332652057204, (2002, 10): 1.1519949214772387, (2002, 11): 0.9248217294538993, (2002, 12): 1.2727311065935878, (2003, 1): 1.2870399021910714, (2003, 2): 0.5604986980213141, (2003, 3):
0.8779326785220639, (2003, 4): 1.06803082532777}}
CodePudding user response:
If we are using a dictionary, then after sourcing the python file
library(reticulate)
library(dplyr)
library(tidyr)
source_python("pytest1.py")
out <- bind_rows(py$df, .id = 'grp') %>%
pivot_longer(cols = -grp) %>%
pivot_wider(names_from = grp, values_from = value) %>%
extract(name, into = c("year", "month"), "\\((\\d ),\\s*(\\d )") %>%
na_if("NaN")
-output
out
# A tibble: 40 × 15
year month DKF GDT GSB HKZ SLG SRL UAB UKE UKF UOR UTH WH1 WH3
<chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 2000 1 1.35 NA 1.43 1.36 1.55 2.06 1.55 1.27 1.32 NA 1.34 1.48 1.43
2 2000 2 1.28 NA 1.37 1.50 1.54 1.38 1.51 1.45 1.48 NA 1.50 1.47 1.38
3 2000 3 1.25 NA 1.16 1.21 1.23 1.75 1.01 1.12 1.17 NA 1.15 1.19 1.15
4 2000 4 0.730 NA 0.785 0.807 0.632 0.845 0.904 0.970 0.972 NA 0.974 0.762 0.781
5 2000 5 0.784 NA 0.742 0.927 0.716 1.21 0.447 0.858 0.852 NA 0.875 0.657 0.661
6 2000 6 0.938 NA 1.03 0.802 0.845 1.01 0.766 0.706 0.619 NA 0.644 1.02 1.00
7 2000 7 0.659 NA 0.724 0.697 0.455 0.651 0.508 0.569 0.537 NA 0.567 0.713 0.746
8 2000 8 0.674 NA 0.577 0.457 0.583 0.741 0.395 0.509 0.430 NA 0.436 0.581 0.648
9 2000 9 1.00 NA 1.03 0.892 0.998 0.829 0.939 0.922 0.826 NA 0.872 1.05 1.07
10 2000 10 0.967 NA 1.19 1.35 1.14 1.14 1.34 1.28 1.33 NA 1.38 1.23 1.18
# … with 30 more rows
data
#pytest1.py
from numpy import nan
df={'DKF': {(2000, 1): 1.3517226474709378, (2000, 2): 1.2830496825194315, (2000, 3): 1.2455233121831182, (2000, 4): 0.7299107400424064, (2000, 5): 0.7835659509257843, (2000, 6): 0.9378139543942825, (2000, 7): 0.6590645941762302, (2000, 8): 0.6744555183919568, (2000, 9): 1.0028705091347772, (2000, 10): 0.9667005317835341, (2000, 11): 1.0678912258546405, (2000, 12): 0.9112284147742452, (2001, 1): 0.8881925577638216, (2001, 2): 1.0094984492846548, (2001, 3): 0.9234818764810746, (2001, 4): 0.8256952570446592, (2001, 5): 0.7823148556967823, (2001, 6): 0.58656187528325, (2001, 7): 0.5986398301438705, (2001, 8): 0.9152977641105378, (2001, 9): 0.7957461362888425, (2001, 10): 1.2289233852664525, (2001, 11): 1.215903707002575, (2001, 12): 0.9411119504485526, (2002, 1): 1.253743089309995, (2002, 2): 1.3771820959703505, (2002, 3): 1.1458998591562888, (2002, 4): 0.780148229684933, (2002, 5): 0.8745953536826678, (2002, 6): 1.14604519185711, (2002, 7): 0.9925386650483022, (2002, 8): 0.8395810391153705, (2002, 9): 0.6922482171262826, (2002, 10): 1.0927541758198784, (2002, 11): 0.9355095991032771, (2002, 12): 1.0512662479817905, (2003, 1): 1.2138933498346607, (2003, 2): 0.47180505624826446, (2003, 3): 0.8997961889216146, (2003, 4): 1.1346551380638876}, 'GDT': {(2000, 1): nan, (2000, 2): nan, (2000, 3): nan, (2000, 4): nan, (2000, 5): nan, (2000, 6): nan, (2000, 7): nan, (2000, 8): nan, (2000, 9): nan, (2000, 10): nan, (2000, 11): nan, (2000, 12): nan, (2001, 1): nan, (2001, 2): nan, (2001, 3): nan, (2001, 4): nan, (2001, 5): nan, (2001, 6): nan, (2001, 7): nan, (2001, 8): nan, (2001, 9): nan, (2001, 10): nan, (2001, 11): nan, (2001, 12): nan, (2002, 1): 1.256807526788879, (2002, 2):
1.3045873333521896, (2002, 3): 1.0922871367435592, (2002, 4): 0.7311444028087076, (2002, 5): 0.9018008043140232, (2002, 6): 0.957461410038454, (2002, 7): 0.8197060450786827, (2002, 8): 0.47577545253187387, (2002, 9): 0.8128263280942774, (2002, 10): 1.1168799254163093, (2002, 11): 0.9324831606889018, (2002, 12): 1.3286891013558542, (2003, 1): 1.2538435349279176, (2003, 2): 0.6461925212429451, (2003, 3): 0.8513379444813536, (2003, 4): 1.0889167190287157}, 'GSB': {(2000, 1): 1.427328551728886, (2000, 2): 1.3664731294718808, (2000, 3): 1.1615089781365158, (2000, 4): 0.7851300114287154, (2000, 5): 0.7422343232255912, (2000, 6): 1.031580853170691, (2000, 7): 0.7242493688325659, (2000, 8): 0.5766162898393684, (2000, 9): 1.0332126497783654, (2000, 10): 1.1857205460845148, (2000, 11): 1.366502815093195, (2000, 12): 1.157381956346292, (2001, 1): 0.9902549635833164, (2001, 2): 0.9724394327156028, (2001, 3): 1.048815013697255, (2001, 4): 0.8273478915528274, (2001, 5): 0.7430593714405965, (2001, 6): 0.7536324648475042, (2001, 7): 0.6349134921464644, (2001, 8): 0.7826830215295701, (2001, 9): 1.0233964167323912, (2001, 10): 1.412918707213485, (2001, 11): 1.260580991090124, (2001, 12): 0.9576845313512137, (2002, 1): 1.2652569266159417, (2002, 2): 1.3065244634866244, (2002, 3): 1.0856890909647214, (2002, 4): 0.7318101398049849, (2002, 5): 0.9215182854866718, (2002, 6): 0.9534957346958998, (2002, 7): 0.8107925205416322, (2002, 8): 0.4734280417496323, (2002, 9): 0.7966062482404612, (2002, 10): 1.1170454368296987, (2002, 11): 0.9322063873084222, (2002, 12): 1.32238691545603, (2003, 1): 1.2531210790686047, (2003, 2): 0.6576300158329207, (2003, 3): 0.8389175666051795, (2003, 4): 1.0881232197385742}, 'HKZ': {(2000, 1): 1.3554525362480663, (2000, 2): 1.4951631344657137, (2000, 3): 1.2105681636598593, (2000, 4): 0.8072930444495694, (2000, 5): 0.926977008767427, (2000, 6): 0.8022017476928317, (2000, 7): 0.69652277417082, (2000, 8): 0.456583016223536, (2000, 9): 0.8919032946330773, (2000, 10): 1.349532169190594, (2000, 11): 1.5861420749020783, (2000, 12): 1.4914960612718604, (2001, 1): 1.1734639773151045, (2001, 2): 0.9458568945260551, (2001, 3): 1.0691427569966114, (2001, 4): 1.1488059357249147, (2001, 5): 1.0912434760028036, (2001, 6): 0.7592430266062555, (2001, 7): 0.7202558342474065, (2001, 8): 0.7608615824541107, (2001, 9): 1.1328043102045258, (2001, 10): 1.4500451856634633, (2001, 11): 1.0657649898420833, (2001, 12): 1.1213623436385283, (2002, 1): 1.2927673511490292, (2002, 2): 1.5212939742846794, (2002, 3): 0.9924934326785696, (2002, 4): 0.9566700271565793, (2002, 5): 1.0323873124589016, (2002, 6): 0.7476240350020518, (2002, 7): 0.9040117274509223, (2002, 8): 0.39706056802306583, (2002, 9): 0.6625794086698624, (2002, 10): 1.1662353900999265, (2002, 11): 0.9919567773693077, (2002, 12): 1.1606766246913955, (2003, 1): 1.4024781315822306, (2003, 2): 0.8526080709173501, (2003, 3): 0.825425230187763, (2003, 4): 1.0372282355745681}, 'SLG': {(2000, 1): 1.5487504409690902, (2000, 2): 1.5415838472843555, (2000, 3): 1.2282126578372121, (2000, 4): 0.632444048068446, (2000, 5):
0.7158862148925723, (2000, 6): 0.8454897104320542, (2000, 7): 0.4551865318931529, (2000, 8): 0.5826158644517344, (2000, 9): 0.9977976362941181, (2000, 10): 1.138989723113055, (2000, 11): 1.0930164859430511, (2000, 12): 0.8898335222651087, (2001, 1): 0.8842004763468283, (2001, 2): 1.0275628718138945, (2001, 3): 0.8746407345516105, (2001, 4): 0.7131039098650879, (2001, 5): 0.6837954767731654, (2001, 6): 0.4790985831081878, (2001, 7): 0.4988440876977696, (2001, 8): 0.8223209745844613, (2001, 9): 0.7417117336660771, (2001, 10): 1.3284354806383687, (2001, 11): 1.3409613738776682, (2001, 12): 0.9324083887988991, (2002, 1): 1.4379027571945358, (2002, 2): 1.7433696218646755, (2002, 3): 1.2750778360525403, (2002, 4): 0.5842975310863218, (2002, 5): 0.7145673671783507, (2002, 6): 1.1216530700131497, (2002, 7): 0.7555671720037355, (2002, 8): 0.6588768243045798, (2002, 9): 0.584884861123621, (2002, 10): 1.1539708804408706, (2002, 11): 0.9312319138226935, (2002, 12): 1.0305200250483402, (2003, 1): 1.3855526535671203, (2003, 2): 0.4802953659778654, (2003, 3): 0.8327866009478592, (2003, 4): 1.0896804098036148}, 'SRL': {(2000,
1): 2.0594032935476854, (2000, 2): 1.3791095262556443, (2000, 3): 1.7505922447857718, (2000, 4): 0.8446108545729051, (2000, 5): 1.2051921061573831, (2000, 6): 1.010183601066476, (2000, 7): 0.6508079260726014, (2000, 8): 0.7407540065635136, (2000, 9): 0.8294641525482448, (2000, 10): 1.136002398465397, (2000, 11): 0.7332513652958302, (2000, 12): 0.7179854954011051, (2001, 1): 1.2405938678639528, (2001, 2): 1.3443045113742507, (2001, 3): 0.6103847170941851, (2001, 4): 0.7889614738491562, (2001, 5): 0.8836293099223432, (2001, 6): 0.6398611202963761, (2001, 7): 0.9101469931017445, (2001, 8): 0.7110037038066164, (2001, 9): 0.6944426634848774, (2001, 10): 0.743163322298458, (2001, 11): 1.641550980464115, (2001, 12): 1.3732158510392996, (2002, 1): 1.5435232330958792, (2002, 2): 1.2671850986946984, (2002, 3): 1.0342041708473233, (2002, 4): 0.7413588349552598, (2002, 5): 0.6662992151308426, (2002, 6): 0.42994912796486, (2002, 7): 0.4614513838546502, (2002, 8): 0.33740401239093476, (2002, 9): 1.0786288336533776, (2002, 10): 0.7201737273806963, (2002, 11): 0.7295008767212589, (2002, 12): 1.1650001638656944, (2003, 1): 1.3133849508688604, (2003, 2): 1.2843906275766657, (2003, 3): 1.7162898530793824, (2003, 4): 0.8887775424337104}, 'UAB': {(2000, 1): 1.554890436351146, (2000, 2): 1.5095900904911665, (2000, 3): 1.0071870623725239, (2000, 4): 0.90356286432306, (2000, 5): 0.4465354831707406, (2000, 6): 0.7661408912717084, (2000, 7): 0.5077752357230882, (2000, 8): 0.3953245353667669, (2000, 9): 0.9392679381098866, (2000, 10): 1.3380420085685858, (2000, 11): 1.0678858961974096, (2000, 12): 1.4888333841570116, (2001, 1): 0.9310731584491987, (2001, 2): 1.23831178634754, (2001, 3): 1.0869269288933887, (2001, 4): 1.0308784345088216, (2001, 5): 0.35816971016021937, (2001, 6): 0.7424053638684773, (2001, 7): 0.5807096459444877, (2001, 8): 0.59610372872468, (2001, 9): 1.041214912761702, (2001, 10): 1.5274150222159848, (2001, 11): 1.0127948462369876, (2001, 12): 1.2298052365051528, (2002, 1): 1.3749320279589967, (2002, 2): 1.1748243056243677, (2002, 3): 1.2195563075988665, (2002, 4): 0.8655470797340363, (2002, 5): 0.9279975373039556, (2002, 6): 1.010587765336004, (2002, 7): 0.3876746609412122, (2002, 8): 0.6273582470414101, (2002, 9): 0.5008568258056315, (2002, 10): 1.237209343982918, (2002, 11): 1.4064113075563864, (2002, 12): 1.1152126487756142, (2003, 1): 1.4878686046714453, (2003, 2): 1.2739834005782047, (2003, 3): 0.9862452377520529, (2003, 4): 0.6976324874080646}, 'UKE': {(2000, 1): 1.2689103271741642, (2000, 2): 1.448850876836714, (2000, 3): 1.1215747148313229, (2000, 4): 0.9697809286187101, (2000, 5): 0.8580554214102996, (2000, 6): 0.7055802545680286, (2000, 7): 0.569177769555276, (2000, 8): 0.5093118817682774, (2000, 9): 0.9217522030201674, (2000, 10): 1.2829829181484778, (2000, 11): 1.37989309039233, (2000, 12): 1.4692246015519577, (2001, 1): 1.2514806457756777, (2001, 2): 0.9622779992784523, (2001, 3): 1.1523632901686611, (2001, 4): 1.170899452345576, (2001, 5): 0.8924892052905243, (2001, 6): 0.6389294687842351, (2001, 7): 0.6533905745080162, (2001, 8): 0.718973320926109, (2001, 9): 1.0480403777450924, (2001, 10): 1.4336148798358987, (2001, 11): 1.0187400631716952, (2001, 12): 1.2025621345600492, (2002, 1): 1.41115713291571, (2002, 2): 1.7419895139140342, (2002, 3): 0.9845770676939698, (2002, 4): 1.0031594716517345, (2002, 5): 1.1751386096650493, (2002, 6): 0.6471700368073762, (2002, 7): 0.6470519297198025, (2002, 8): 0.32799519360372364, (2002, 9): 0.6818357988453819, (2002, 10): 1.0383455732558626, (2002, 11): 1.1494409536769357, (2002, 12): 1.3192795655449814, (2003, 1): 1.6602002396523663, (2003, 2): 0.9006465583294068, (2003, 3): 0.9067321375346832, (2003, 4): 0.9961612972679239}, 'UKF': {(2000, 1): 1.3249433826076369, (2000, 2): 1.4834390048790316, (2000, 3): 1.1720744005021664, (2000, 4): 0.9721227613412933, (2000, 5): 0.8515448592728304, (2000, 6): 0.6193634003508302, (2000, 7): 0.5370454750545013, (2000, 8): 0.43042095662362834, (2000, 9): 0.8263760497346081, (2000, 10): 1.3281730350770156, (2000, 11): 1.4011761926628954, (2000, 12): 1.6555818191216964, (2001, 1): 1.3357608146005617, (2001, 2): 1.034198046367072, (2001, 3): 1.121260727670918, (2001, 4): 1.126124763713561, (2001, 5): 0.8756813654921048, (2001, 6): 0.5645819016595045, (2001, 7): 0.6105116367301959, (2001, 8): 0.6219140873691195, (2001, 9): 1.051983907255014, (2001, 10): 1.39389121228373, (2001, 11): 1.0481969547160257, (2001, 12): 1.2687238324230548, (2002, 1): 1.5254562990321106, (2002, 2): 2.051792727712291, (2002, 3): 1.0025016594272602, (2002, 4): 1.0659149467240578, (2002, 5): 1.1244210818495683, (2002, 6): 0.5315380292328106, (2002, 7): 0.5749383603397371, (2002, 8): 0.2885568506939066, (2002, 9): 0.6685273721263465, (2002, 10): 1.0808780812122165, (2002, 11): 1.0930127690879337, (2002, 12): 1.3422979556904777, (2003, 1): 1.7777334775059637, (2003, 2): 0.8524602861172142, (2003, 3): 0.9132216671993684, (2003, 4): 1.0135032567751208}, 'UOR': {(2000, 1): nan, (2000, 2): nan, (2000, 3): nan, (2000, 4): nan, (2000, 5): nan, (2000, 6): nan, (2000, 7): nan, (2000, 8): nan, (2000, 9): nan, (2000, 10): nan, (2000, 11): nan, (2000, 12): nan, (2001, 1): nan, (2001, 2): nan, (2001, 3): nan, (2001, 4): nan, (2001, 5): nan, (2001, 6): nan, (2001, 7): nan, (2001, 8): nan, (2001, 9): nan, (2001, 10): nan, (2001, 11): nan, (2001, 12): nan, (2002, 1): 1.568196798031884, (2002, 2): 1.6355130591248717, (2002, 3): 1.1190957069138054, (2002, 4): 0.8733079573257021, (2002, 5): 1.1104032676426743, (2002, 6): 1.0014213082673353, (2002, 7): 0.46462779835652446, (2002, 8): 0.43754519044744683, (2002, 9): 0.34292019892534936, (2002, 10): 1.1210636145981827, (2002, 11): 1.332485106490388, (2002, 12): 1.2229630481992118, (2003, 1): 1.508984812821176, (2003, 2): 1.1887845201515987, (2003, 3): 0.8611108497973553, (2003, 4): 0.9059291273938993}, 'UTH': {(2000, 1): 1.3359812952143335, (2000, 2): 1.4988411220343303, (2000, 3): 1.1487175960792586, (2000, 4): 0.9738685779965163, (2000, 5): 0.8745674941392821, (2000, 6): 0.6443392124290698, (2000, 7): 0.5668678025838506, (2000, 8): 0.436425063880557, (2000, 9): 0.8719463874510108, (2000, 10): 1.3778434744682042, (2000, 11): 1.500864165719369, (2000, 12): 1.5967169053821837, (2001, 1): 1.3473679073576996, (2001, 2): 1.0010888072264865, (2001, 3): 1.1149274936810654, (2001, 4): 1.1446113967153915, (2001, 5): 0.9704882177138088, (2001, 6): 0.5855553430495062, (2001, 7): 0.6431702098251845,
(2001, 8): 0.6673872030730853, (2001, 9): 1.0184462652370758, (2001, 10): 1.421874247940507, (2001, 11): 1.0718512105705393, (2001, 12): 1.2613274250630966, (2002, 1): 1.4613909819098134, (2002, 2): 1.9547228219671733, (2002, 3): 0.9969535824706017, (2002, 4): 1.0390713222466403, (2002, 5): 1.1405910444641447, (2002, 6): 0.5816438797339953, (2002, 7): 0.6358023493332612, (2002, 8): 0.28488584160071145, (2002, 9): 0.6864525632252447, (2002, 10): 1.0811011952357756, (2002, 11): 1.1342053981023652, (2002, 12): 1.3175258026284367, (2003, 1): 1.7155125770519015,
(2003, 2): 0.8655302690735893, (2003, 3): 0.9004624256328815, (2003, 4): 1.0362839133127566}, 'WH1': {(2000, 1): 1.479678096243991, (2000, 2): 1.4655890964853133, (2000, 3): 1.1907311408382424, (2000, 4): 0.7624104192520295, (2000, 5): 0.6570086687440684, (2000, 6): 1.0220573194773563, (2000, 7): 0.7128320531734508, (2000, 8): 0.5808600771066151, (2000, 9): 1.0547152354298281, (2000, 10): 1.225085170050707, (2000, 11): 1.4736262369880635, (2000, 12): 1.1945189658959103, (2001, 1): 1.0201317967474317, (2001, 2): 1.012860123046342, (2001, 3): 0.9979750061138811, (2001, 4): 0.7657471321151421, (2001, 5): 0.6834537983986184, (2001, 6): 0.7291585577119047, (2001, 7): 0.546398452720382, (2001, 8): 0.7511935928668964, (2001, 9): 0.9255563657580868, (2001, 10): 1.504270396795507, (2001, 11): 1.3057348102285011, (2001, 12): 0.95159456191817, (2002, 1): 1.343115697136973, (2002, 2): 1.458869255883179, (2002, 3): 1.1351981097654034, (2002, 4): 0.6741782716236064, (2002, 5): 0.8381647865673924, (2002, 6): 0.943335749690483, (2002, 7): 0.7771730299735837, (2002, 8): 0.44638095117997273, (2002, 9): 0.8030759725471737, (2002, 10): 1.119470100075558, (2002, 11): 0.8945063067825321, (2002, 12): 1.259814754626267, (2003, 1): 1.346474717311829, (2003, 2): 0.5614396933726116, (2003, 3): 0.9001633009379663, (2003, 4): 1.073275299867811}, 'WH3': {(2000, 1): 1.4338343574503027, (2000, 2): 1.384953627743628, (2000, 3): 1.1535912277947202, (2000, 4): 0.7809206933722733, (2000, 5): 0.6605269426785618, (2000, 6): 1.0027970510744195, (2000, 7): 0.745909465377024, (2000, 8): 0.6482779349782384, (2000, 9): 1.072484454331807, (2000, 10): 1.184206133353829, (2000, 11): 1.37061783182705, (2000, 12): 1.1447962269107579, (2001, 1): 1.0056652795344019, (2001, 2): 1.0245671990470344, (2001, 3): 1.0022481060568582, (2001, 4): 0.7777726845228051, (2001, 5): 0.7053399171788303, (2001, 6): 0.7832286207773255, (2001, 7): 0.5623766087315936, (2001, 8): 0.7462191387020645, (2001, 9): 0.9638196538715932, (2001, 10): 1.4669122980607163, (2001, 11): 1.2973547468521627, (2001, 12): 0.9414453931278712, (2002, 1): 1.2898967228235176, (2002, 2): 1.3607244135464809, (2002, 3): 1.1432591220278236, (2002, 4): 0.7083203488460438, (2002, 5): 0.8652599449264562, (2002, 6): 0.9549555936338141, (2002, 7): 0.7822433450003142, (2002, 8): 0.4705431907982273, (2002, 9): 0.850332652057204, (2002, 10): 1.1519949214772387, (2002, 11): 0.9248217294538993, (2002, 12): 1.2727311065935878, (2003, 1): 1.2870399021910714, (2003, 2): 0.5604986980213141, (2003, 3):
0.8779326785220639, (2003, 4): 1.06803082532777}}
CodePudding user response:
if you have data already in R you can run:
library(reticulate)
d <- py_to_r(py_eval('my_data().reset_index()'))
d
which should give you:
year month DKF GDT GSB HKZ SLG SRL UAB UKE
1 2000 1 1.3517226 NaN 1.4273286 1.3554525 1.5487504 2.0594033 1.5548904 1.2689103
2 2000 2 1.2830497 NaN 1.3664731 1.4951631 1.5415838 1.3791095 1.5095901 1.4488509
3 2000 3 1.2455233 NaN 1.1615090 1.2105682 1.2282127 1.7505922 1.0071871 1.1215747
4 2000 4 0.7299107 NaN 0.7851300 0.8072930 0.6324440 0.8446109 0.9035629 0.9697809
5 2000 5 0.7835660 NaN 0.7422343 0.9269770 0.7158862 1.2051921 0.4465355 0.8580554
if you are dealing with time series data:
xts::xts(d[-(1:2)], zoo::as.yearmon(paste(d[,1], d[,2]), '%Y %m'))
DKF GDT GSB HKZ SLG SRL UAB UKE UKF
Jan 2000 1.3517226 NaN 1.4273286 1.3554525 1.5487504 2.0594033 1.5548904 1.2689103 1.3249434
Feb 2000 1.2830497 NaN 1.3664731 1.4951631 1.5415838 1.3791095 1.5095901 1.4488509 1.4834390
Mar 2000 1.2455233 NaN 1.1615090 1.2105682 1.2282127 1.7505922 1.0071871 1.1215747 1.1720744
Apr 2000 0.7299107 NaN 0.7851300 0.8072930 0.6324440 0.8446109 0.9035629 0.9697809 0.9721228
May 2000 0.7835660 NaN 0.7422343 0.9269770 0.7158862 1.2051921 0.4465355 0.8580554 0.8515449
Jun 2000 0.9378140 NaN 1.0315809 0.8022017 0.8454897 1.0101836 0.7661409 0.7055803 0.6193634
Jul 2000 0.6590646 NaN 0.7242494 0.6965228 0.4551865 0.6508079 0.5077752 0.5691778 0.5370455
Aug 2000 0.6744555 NaN 0.5766163 0.4565830 0.5826159 0.7407540 0.3953245 0.5093119 0.4304210
And as ftable
format:
a <- ftable(xtabs(value~., pivot_longer(d, -c(Year, month))), row.vars = 1:2)
replace(a, a==0, NaN)
name DKF GDT GSB HKZ SLG SRL UAB UKE UKF UOR UTH WH1 WH3
Year month
2000 1 1.3517226 NaN 1.4273286 1.3554525 1.5487504 2.0594033 1.5548904 1.2689103 1.3249434 NaN 1.3359813 1.4796781 1.4338344
2 1.2830497 NaN 1.3664731 1.4951631 1.5415838 1.3791095 1.5095901 1.4488509 1.4834390 NaN 1.4988411 1.4655891 1.3849536
3 1.2455233 NaN 1.1615090 1.2105682 1.2282127 1.7505922 1.0071871 1.1215747 1.1720744 NaN 1.1487176 1.1907311 1.1535912
4 0.7299107 NaN 0.7851300 0.8072930 0.6324440 0.8446109 0.9035629 0.9697809 0.9721228 NaN 0.9738686 0.7624104 0.7809207
5 0.7835660 NaN 0.7422343 0.9269770 0.7158862 1.2051921 0.4465355 0.8580554 0.8515449 NaN 0.8745675 0.6570087 0.6605269
6 0.9378140 NaN 1.0315809 0.8022017 0.8454897 1.0101836 0.7661409 0.7055803 0.6193634 NaN 0.6443392 1.0220573 1.0027971
7 0.6590646 NaN 0.7242494 0.6965228 0.4551865 0.6508079 0.5077752 0.5691778 0.5370455 NaN 0.5668678 0.7128321 0.7459095
8 0.6744555 NaN 0.5766163 0.4565830 0.5826159 0.7407540 0.3953245 0.5093119 0.4304210 NaN 0.4364251 0.5808601 0.6482779
9 1.0028705 NaN 1.0332126 0.8919033 0.9977976 0.8294642 0.9392679 0.9217522 0.8263760 NaN 0.8719464 1.0547152 1.0724845
10 0.9667005 NaN 1.1857205 1.3495322 1.1389897 1.1360024 1.3380420 1.2829829 1.3281730 NaN 1.3778435 1.2250852 1.1842061
11 1.0678912 NaN 1.3665028 1.5861421 1.0930165 0.7332514 1.0678859 1.3798931 1.4011762 NaN 1.5008642 1.4736262 1.3706178
12 0.9112284 NaN 1.1573820 1.4914961 0.8898335 0.7179855 1.4888334 1.4692246 1.6555818 NaN 1.5967169 1.1945190 1.1447962
2001 1 0.8881926 NaN 0.9902550 1.1734640 0.8842005 1.2405939 0.9310732 1.2514806 1.3357608 NaN 1.3473679 1.0201318 1.0056653
2 1.0094984 NaN 0.9724394 0.9458569 1.0275629 1.3443045 1.2383118 0.9622780 1.0341980 NaN 1.0010888 1.0128601 1.0245672
3 0.9234819 NaN 1.0488150 1.0691428 0.8746407 0.6103847 1.0869269 1.1523633 1.1212607 NaN 1.1149275 0.9979750 1.0022481
4 0.8256953 NaN 0.8273479 1.1488059 0.7131039 0.7889615 1.0308784 1.1708995 1.1261248 NaN 1.1446114 0.7657471 0.7777727
5 0.7823149 NaN 0.7430594 1.0912435 0.6837955 0.8836293 0.3581697 0.8924892 0.8756814 NaN 0.9704882 0.6834538 0.7053399
6 0.5865619 NaN 0.7536325 0.7592430 0.4790986 0.6398611 0.7424054 0.6389295 0.5645819 NaN 0.5855553 0.7291586 0.7832286
7 0.5986398 NaN 0.6349135 0.7202558 0.4988441 0.9101470 0.5807096 0.6533906 0.6105116 NaN 0.6431702 0.5463985 0.5623766
8 0.9152978 NaN 0.7826830 0.7608616 0.8223210 0.7110037 0.5961037 0.7189733 0.6219141 NaN 0.6673872 0.7511936 0.7462191
9 0.7957461 NaN 1.0233964 1.1328043 0.7417117 0.6944427 1.0412149 1.0480404 1.0519839 NaN 1.0184463 0.9255564 0.9638197
10 1.2289234 NaN 1.4129187 1.4500452 1.3284355 0.7431633 1.5274150 1.4336149 1.3938912 NaN 1.4218742 1.5042704 1.4669123
11 1.2159037 NaN 1.2605810 1.0657650 1.3409614 1.6415510 1.0127948 1.0187401 1.0481970 NaN 1.0718512 1.3057348 1.2973547
12 0.9411120 NaN 0.9576845 1.1213623 0.9324084 1.3732159 1.2298052 1.2025621 1.2687238 NaN 1.2613274 0.9515946 0.9414454