Tensorflow synapse output and input as text file - python

I have a object-detection output result with tensorflow.
which is a 13*13*125 float32 array. (tiny-yolo-v2)
which I can output with a text file.
Now I want to write another program, to parse the text file.
How can I use numpy or something else, to load the text file back to array?
I just want to load the text file, and place with the right position,
just like it's original (13*13*125) array, so i can do something with it.
Below is the sample of text output, full file is too long so i truncate some of it.
[[[ 1.02357492e-02 -4.58745286e-02 -3.53223026e-01 1.05358012e-01
-4.35989094e+00 -6.99408484e+00 -4.73687983e+00 -4.24568987e+00
-5.61564398e+00 -2.89398456e+00 -6.23602247e+00 -1.50982809e+00
-5.22811985e+00 -2.62615561e+00 -5.22997189e+00 -7.89167452e+00
-5.44317961e+00 -6.20110512e+00 -5.04192924e+00 -2.02722573e+00
-4.10300493e+00 -6.34364843e+00 -5.39359808e+00 -8.28967571e+00
-5.09567547e+00 7.58925438e-01 3.76614660e-01 -1.04403806e+00
-6.47649229e-01 -3.87396884e+00 -6.38732052e+00 -4.58577824e+00
-4.16016054e+00 -5.30572081e+00 -3.85717177e+00 -6.05014038e+00
-1.81165671e+00 -3.75763679e+00 -2.88092995e+00 -4.67342377e+00
-4.71987104e+00 -4.39510489e+00 -5.11723280e+00 -5.39322329e+00
-2.66565347e+00 -3.81883574e+00 -5.66908169e+00 -4.71839476e+00
-6.30157852e+00 -4.82082224e+00 2.92960078e-01 5.97341239e-01
-1.40992713e+00 -1.11044288e+00 -4.18370819e+00 -7.12151051e+00
-5.35866928e+00 -4.90489340e+00 -5.99866199e+00 -5.80428791e+00
-6.52985144e+00 -3.30560398e+00 -5.25323820e+00 -3.49718428e+00
-5.35445309e+00 -4.74132204e+00 -5.51197958e+00 -5.49749136e+00
-5.92978096e+00 -3.28844571e+00 -5.49212742e+00 -6.66666460e+00
-4.93477535e+00 -7.05240107e+00 -5.52950144e+00 3.19003403e-01
4.28509444e-01 -1.37157345e+00 -7.52444148e-01 -5.07417107e+00
-6.86192179e+00 -5.41829157e+00 -4.65392542e+00 -6.23983860e+00
-5.52950287e+00 -5.39464998e+00 -3.28175688e+00 -4.32805681e+00
-3.33854008e+00 -5.02955580e+00 -5.26897430e+00 -4.58855247e+00
-5.45577812e+00 -7.06963253e+00 -3.20757794e+00 -4.94750690e+00
-6.26993036e+00 -5.85515499e+00 -7.07721949e+00 -5.31591606e+00
3.89474362e-01 3.98911506e-01 -1.40775967e+00 -1.07488203e+00
-3.43887043e+00 -7.79423666e+00 -6.68394804e+00 -5.61368179e+00
-6.34769297e+00 -6.83281803e+00 -6.70960665e+00 -3.65747070e+00
-5.44360542e+00 -4.12546444e+00 -5.75262260e+00 -5.18836164e+00
-5.15945435e+00 -6.07800007e+00 -6.70447493e+00 -4.12499619e+00
-6.12767649e+00 -6.96556044e+00 -4.83318233e+00 -7.69717407e+00
-6.56721640e+00]
[ 1.61234528e-01 -4.70345289e-01 2.98500329e-01 8.74740630e-03
-8.38169765e+00 -1.54907408e+01 -1.07314129e+01 -8.34741211e+00
-1.13781738e+01 -7.54940701e+00 -1.22155275e+01 -4.80996466e+00
-1.10561914e+01 -5.93502522e+00 -1.11998129e+01 -1.67726002e+01
-1.05111227e+01 -1.29506483e+01 -9.64104748e+00 -5.52446413e+00
-8.78175163e+00 -1.36118546e+01 -1.10795031e+01 -1.83356972e+01
-1.16452293e+01 4.82036829e-01 5.17037362e-02 -9.76964355e-01
-1.00542104e+00 -8.73878384e+00 -1.47731256e+01 -9.41302872e+00
-7.78294754e+00 -1.06155653e+01 -8.81066895e+00 -1.25413752e+01
-5.20565796e+00 -8.54619980e+00 -6.01115370e+00 -1.01015797e+01
-9.61278534e+00 -8.36357498e+00 -1.08267517e+01 -1.04049816e+01
-5.86520195e+00 -7.45389271e+00 -1.18097382e+01 -9.29529381e+00
-1.35695248e+01 -1.10684004e+01 -4.49465424e-01 7.23291993e-01
-1.33733368e+00 -1.57884443e+00 -9.29384422e+00 -1.66824398e+01
-1.17275839e+01 -1.19206190e+01 -1.26649590e+01 -1.42257290e+01
-1.43436852e+01 -9.10658264e+00 -1.34929924e+01 -8.85398579e+00
-1.30774622e+01 -9.42021656e+00 -1.28294401e+01 -1.38840723e+01
-1.24558411e+01 -8.84429169e+00 -1.17602949e+01 -1.50427999e+01
-1.07627420e+01 -1.64452419e+01 -1.44604845e+01 -1.37743965e-01
9.12959814e-01 -1.42015231e+00 -1.60620236e+00 -1.05381451e+01
-1.63558159e+01 -1.20377207e+01 -9.80946445e+00 -1.27067585e+01
-1.21898088e+01 -1.22341051e+01 -7.98180962e+00 -1.05312557e+01
-7.84510660e+00 -1.18309231e+01 -1.10772572e+01 -9.54380226e+00
-1.25601234e+01 -1.43880062e+01 -6.95701408e+00 -1.07601147e+01
-1.41597824e+01 -1.32586575e+01 -1.58946438e+01 -1.29948921e+01
-1.14585623e-01 6.38350546e-01 -1.65523076e+00 -1.67830050e+00
-6.13089418e+00 -1.99999962e+01 -1.58348789e+01 -1.47631931e+01
-1.50945425e+01 -1.69028625e+01 -1.67195797e+01 -1.10481138e+01
-1.45758791e+01 -1.19301071e+01 -1.46967478e+01 -1.34157457e+01
-1.31685534e+01 -1.52268438e+01 -1.63326721e+01 -1.15273895e+01
-1.43742008e+01 -1.75251045e+01 -1.33377829e+01 -1.88240013e+01
-1.68392487e+01]
[ 7.36066699e-01 -3.97309035e-01 3.82082105e-01 -4.82245922e-01
-1.08697920e+01 -2.12837963e+01 -1.57861137e+01 -1.22496452e+01
-1.57928638e+01 -1.18547354e+01 -1.80118999e+01 -7.86523342e+00
-1.56991911e+01 -1.01874857e+01 -1.54575453e+01 -2.39257183e+01
-1.58380346e+01 -1.81504345e+01 -1.34132137e+01 -8.03548622e+00
-1.13906355e+01 -1.92472000e+01 -1.61356659e+01 -2.55897179e+01
-1.63397522e+01 1.27788866e+00 1.47072300e-01 -1.28866732e+00
-1.59696829e+00 -1.16580629e+01 -2.02393227e+01 -1.35793419e+01
-1.12705021e+01 -1.47425270e+01 -1.25504894e+01 -1.83755665e+01
-7.93362045e+00 -1.18984699e+01 -9.53976822e+00 -1.38737183e+01
-1.44854469e+01 -1.36983585e+01 -1.51859636e+01 -1.39583693e+01
-7.84845734e+00 -8.99971676e+00 -1.61694489e+01 -1.35863504e+01
-1.87846413e+01 -1.51690617e+01 -2.49404103e-01 7.78339028e-01
-1.56386018e+00 -1.99905097e+00 -1.37179251e+01 -2.25832596e+01
-1.66161022e+01 -1.74464626e+01 -1.75472069e+01 -1.98302021e+01
-2.10891953e+01 -1.31870728e+01 -1.92208481e+01 -1.34429426e+01
-1.86840858e+01 -1.41525555e+01 -1.94452248e+01 -1.92487373e+01
-1.68426666e+01 -1.22350378e+01 -1.52343149e+01 -2.06815968e+01
-1.60188885e+01 -2.32096100e+01 -2.02435265e+01 -4.40291494e-01
9.96976972e-01 -1.84825552e+00 -2.43193603e+00 -1.60602741e+01
-2.19036083e+01 -1.68400517e+01 -1.44771357e+01 -1.67081776e+01
-1.65251980e+01 -1.87576752e+01 -1.10540638e+01 -1.53755598e+01
-1.19390879e+01 -1.68008995e+01 -1.63949070e+01 -1.50700588e+01
-1.70634537e+01 -1.89655972e+01 -8.94600296e+00 -1.35194263e+01
-1.92807941e+01 -1.87041073e+01 -2.21856689e+01 -1.78996506e+01
-1.16609700e-01 8.56797874e-01 -1.91140997e+00 -2.10396862e+00
-1.01619406e+01 -2.68737984e+01 -2.20997658e+01 -2.17673626e+01
-2.05160961e+01 -2.39515285e+01 -2.49530716e+01 -1.63933392e+01
-2.10805988e+01 -1.75326271e+01 -2.07077827e+01 -2.00489578e+01
-1.99268951e+01 -2.12444305e+01 -2.24091759e+01 -1.62087784e+01
-1.91759224e+01 -2.42828751e+01 -1.97305717e+01 -2.62558804e+01
-2.35940552e+01]
[ 1.64787069e-01 -1.68441325e-01 4.64288980e-01 -7.47514069e-01
-1.13719883e+01 -2.10964813e+01 -1.58254576e+01 -1.20305328e+01
-1.56141787e+01 -1.24658909e+01 -1.81972294e+01 -8.23118114e+00
-1.59399385e+01 -1.12004852e+01 -1.55562868e+01 -2.40003681e+01
-1.60093613e+01 -1.83026943e+01 -1.34068794e+01 -6.93028069e+00
-1.03299189e+01 -1.94805012e+01 -1.63801708e+01 -2.56201134e+01
-1.63976402e+01 1.10720372e+00 1.62255913e-01 -1.05587530e+00
-1.77236927e+00 -1.20724707e+01 -2.02502041e+01 -1.33943348e+01
-1.08683929e+01 -1.41024590e+01 -1.30132847e+01 -1.84846783e+01
-7.94123554e+00 -1.22969742e+01 -1.03535299e+01 -1.35685444e+01
-1.45834017e+01 -1.35028725e+01 -1.57420397e+01 -1.32303410e+01
-6.45265770e+00 -7.93988371e+00 -1.61845226e+01 -1.36617155e+01
-1.87895412e+01 -1.55598927e+01 -1.80259988e-01 1.03606677e+00
-1.41069508e+00 -2.04342628e+00 -1.45336590e+01 -2.16282444e+01
-1.64379387e+01 -1.69099007e+01 -1.71524391e+01 -2.03189278e+01
-2.16217175e+01 -1.30156775e+01 -1.94296246e+01 -1.43709736e+01
-1.84245052e+01 -1.49390011e+01 -1.87584820e+01 -1.90721817e+01
-1.62022648e+01 -1.08158903e+01 -1.40190802e+01 -2.06927853e+01
-1.63408413e+01 -2.31514969e+01 -2.11648083e+01 -5.68280160e-01
1.25197387e+00 -1.61449420e+00 -2.57362318e+00 -1.61436348e+01
-2.13765507e+01 -1.67169514e+01 -1.40701723e+01 -1.61057911e+01
-1.66000061e+01 -1.96425610e+01 -1.07086115e+01 -1.61478901e+01
-1.29794235e+01 -1.68822880e+01 -1.73082714e+01 -1.47676716e+01
-1.75105286e+01 -1.80940990e+01 -7.51458597e+00 -1.21162443e+01
-1.94071865e+01 -1.87942944e+01 -2.22906494e+01 -1.84283085e+01
1.27930269e-01 1.27133667e+00 -1.74558055e+00 -2.15854144e+00
-1.09730215e+01 -2.62110558e+01 -2.23466148e+01 -2.14312553e+01
-1.95770702e+01 -2.44276924e+01 -2.58058815e+01 -1.61417542e+01
-2.14367542e+01 -1.83109913e+01 -2.04648132e+01 -2.08876133e+01
-1.97048931e+01 -2.15082779e+01 -2.18297424e+01 -1.52893324e+01
-1.85209503e+01 -2.46299267e+01 -1.97363987e+01 -2.58215981e+01
-2.42690868e+01]
.
.
.
[-4.79533195e-01 -7.68981576e-01 -1.77157074e-01 -2.00561881e-01
-6.15729952e+00 -1.10808945e+01 -8.79792976e+00 -9.85613537e+00
-1.03026905e+01 -6.87720442e+00 -1.21334057e+01 -7.71150637e+00
-1.17531910e+01 -6.80997133e+00 -1.25995235e+01 -1.25998411e+01
-1.17608614e+01 -1.11489801e+01 -9.56524754e+00 -5.58242607e+00
-8.39977741e+00 -1.11510391e+01 -1.21788979e+01 -1.27471313e+01
-9.78714943e+00 1.04039955e+00 -1.47011960e+00 -1.81243956e+00
-1.05356848e+00 -7.45137024e+00 -1.10531626e+01 -7.84224939e+00
-9.17456150e+00 -8.58650589e+00 -5.74499321e+00 -1.13209743e+01
-8.41722298e+00 -1.01030149e+01 -6.03559208e+00 -1.16964493e+01
-1.01863642e+01 -1.12248173e+01 -1.11838684e+01 -8.50443459e+00
-5.21056652e+00 -8.14196777e+00 -1.00152636e+01 -1.10866699e+01
-1.11966391e+01 -9.41972065e+00 -1.03180420e+00 -1.99524832e+00
-1.77945817e+00 -1.55166841e+00 -8.39315605e+00 -1.05041189e+01
-8.82065392e+00 -9.86864853e+00 -9.29331779e+00 -7.26610661e+00
-1.02731133e+01 -8.88734341e+00 -1.01116686e+01 -7.06797981e+00
-1.14280262e+01 -1.06731510e+01 -1.14312458e+01 -1.05220804e+01
-9.01323318e+00 -5.39441586e+00 -8.52228928e+00 -9.87894917e+00
-1.08900566e+01 -1.09518299e+01 -9.72581577e+00 -2.16618586e+00
-1.49259973e+00 -1.68929064e+00 -1.36120069e+00 -8.58770275e+00
-1.00534191e+01 -9.97209167e+00 -1.05166273e+01 -9.29751587e+00
-7.26231098e+00 -1.13336391e+01 -9.37137890e+00 -1.04662256e+01
-7.50347424e+00 -1.16567268e+01 -1.01384783e+01 -1.12277622e+01
-1.08337603e+01 -9.39500999e+00 -6.51295757e+00 -9.02511883e+00
-1.06069736e+01 -1.13605204e+01 -1.08889675e+01 -9.81694508e+00
-1.06967080e+00 -1.58631933e+00 -1.36870170e+00 -1.17178059e+00
-7.71994257e+00 -9.72991562e+00 -9.93029594e+00 -1.08334541e+01
-9.51464462e+00 -9.31674480e+00 -1.08087626e+01 -9.48193550e+00
-9.81091881e+00 -8.34595966e+00 -1.10064735e+01 -9.91674614e+00
-1.18921404e+01 -1.08112535e+01 -9.73410416e+00 -7.14041519e+00
-8.62492752e+00 -1.10488844e+01 -1.03341990e+01 -1.04487247e+01
-1.07167931e+01]]]
I tried to use following format, it can read out something but the sequence is totally wrong
net_out = np.fromfile(filename, np.float32, count=13*13*125).reshape(13,13,125)

Related

List of coordinates to WKB hex

I am having some trouble when trying to load geojson data to Athena. I am trying to load world data boundaries (from this link)
The thing is, for some reason AWS Athena does not let me load MultiPolygon countries data (loading done based on this), only Polygons. As a result of this, only the first Polygon of a MultiPolygon is loaded.
Because of this, I am trying to find another solution to load the data. I have thought of the following:
Try to build a DataFrame with the name of the country, the list of coordinates and the corresponding type (Polygon or MultiPolygon). Depending on the type, generate a new column in wkb hex format accepted by Athena. Generate a partitioned parquet file and try to load it into Athena.
Any thoughts on how to do this?
Coordinates are coming in this format:
Polygon:
[[[-17.102499999999907, 32.823330000000055], [-17.05305999999996, 32.80944000000005], [-17.029999999999916, 32.810560000000066], [-17.013199999999927, 32.81346000000008], [-16.959999999999923, 32.830820000000074], [-16.913329999999917, 32.83916000000005], [-16.902219999999943, 32.83791000000008], [-16.715559999999925, 32.758890000000065], [-16.720839999999953, 32.74528000000004], [-16.819579999999917, 32.64611000000008], [-16.82188999999994, 32.64435000000009], [-16.83916999999991, 32.638610000000085], [-16.94360999999992, 32.637500000000045], [-16.988329999999905, 32.65527000000009], [-17.067779999999914, 32.67694000000006], [-17.102499999999907, 32.68333000000007], [-17.15805999999992, 32.709160000000054], [-17.19596999999993, 32.72888000000006], [-17.206389999999942, 32.73750000000007], [-17.232779999999934, 32.77000000000004], [-17.239169999999945, 32.77833000000004], [-17.254519999999957, 32.81284000000005], [-17.190699999999936, 32.86861000000005], [-17.169719999999927, 32.87028000000004], [-17.15888999999993, 32.865270000000066], [-17.151949999999943, 32.85750000000007], [-17.13333999999992, 32.838880000000074], [-17.12527999999992, 32.83194000000009], [-17.102499999999907, 32.823330000000055]]]
MultiPolygon:
[[[[111.41152000000005, 2.376390000000071], [111.36804000000006, 2.359580000000051], [111.35081000000008, 2.371940000000052], [111.30393000000004, 2.450000000000045], [111.30554000000006, 2.466390000000046], [111.31184000000007, 2.497220000000084], [111.30497000000003, 2.594440000000077], [111.29525000000007, 2.6808300000000713], [111.29332000000005, 2.73333000000008], [111.29540000000003, 2.748470000000054], [111.30359000000004, 2.767640000000085], [111.31248000000005, 2.775830000000041], [111.32895000000008, 2.780350000000055], [111.34539000000007, 2.771810000000073], [111.35443000000004, 2.760000000000047], [111.37776000000008, 2.708050000000071], [111.38165000000004, 2.698330000000055], [111.38388000000003, 2.680000000000062], [111.38388000000003, 2.652500000000088], [111.38026000000008, 2.615000000000066], [111.37693000000007, 2.536110000000064], [111.37692000000004, 2.495280000000093], [111.37831000000006, 2.482780000000048], [111.38109000000003, 2.471940000000074], [111.39943000000005, 2.408050000000059], [111.40583000000004, 2.393890000000056], [111.41152000000005, 2.376390000000071]]], [[[104.21191000000005, 2.7113900000000513], [104.16775000000007, 2.705280000000073], [104.15554000000003, 2.710550000000069], [104.14165000000003, 2.730830000000082], [104.12941000000006, 2.753890000000069], [104.12497000000008, 2.770000000000038], [104.12329000000005, 2.781670000000076], [104.16948000000008, 2.892500000000041], [104.18385000000006, 2.879440000000045], [104.18794000000003, 2.86779000000007], [104.18941000000007, 2.866390000000081], [104.19912000000005, 2.841940000000079], [104.20415000000003, 2.826670000000092], [104.21719000000007, 2.785560000000089], [104.21970000000005, 2.774440000000083], [104.22073000000006, 2.721870000000081], [104.21191000000005, 2.7113900000000513]]], [[[117.6869200000001, 4.168340000000057], [117.64373, 4.212990000000047], [117.63890000000004, 4.22861000000006], [117.64972, 4.238050000000044], [117.68581000000006, 4.259880000000066], [117.72388000000001, 4.260000000000048], [117.7460900000001, 4.258330000000058], [117.7602700000001, 4.255280000000084], [117.76971000000003, 4.25111000000004], [117.78554000000008, 4.239440000000059], [117.90356000000008, 4.174040000000048], [117.87944000000005, 4.173050000000046], [117.83971000000008, 4.171940000000063], [117.72664000000009, 4.169720000000041], [117.6869200000001, 4.168340000000057]]], [[[118.59604000000002, 4.638330000000053], [118.5681800000001, 4.599440000000072], [118.52970000000005, 4.600280000000055], [118.34987000000001, 4.67205000000007], [118.39462000000003, 4.676050000000089], [118.47887000000003, 4.689170000000047], [118.57640000000004, 4.650830000000042], [118.59604000000002, 4.638330000000053]]], [[[100.31762000000003, 5.335420000000056], [100.28704000000005, 5.254440000000045], [100.20386000000008, 5.271110000000078], [100.19609000000003, 5.293330000000083], [100.17968000000008, 5.427500000000066], [100.18580000000003, 5.462290000000053], [100.24774000000008, 5.466670000000079], [100.26110000000006, 5.466940000000079], [100.27275000000003, 5.464720000000057], [100.29413000000005, 5.458050000000071], [100.30525000000006, 5.451940000000093], [100.30827000000005, 5.4461200000000645], [100.32025000000004, 5.427780000000041], [100.32469000000003, 5.38083000000006], [100.31762000000003, 5.335420000000056]]], [[[99.86954000000003, 6.419300000000078], [99.89386000000007, 6.4019400000000815], [99.91545000000008, 6.387080000000083], [99.92302000000007, 6.333610000000078], [99.87162000000006, 6.288190000000043], [99.73956000000004, 6.248890000000074], [99.65694000000008, 6.360830000000078], [99.65221000000008, 6.369720000000086], [99.64695000000006, 6.385000000000048], [99.64193000000006, 6.407220000000052], [99.64222000000007, 6.422080000000051], [99.70332000000008, 6.426110000000051], [99.71666000000005, 6.425000000000068], [99.72747000000004, 6.4222200000000385], [99.73220000000003, 6.413050000000055], [99.74942000000004, 6.407780000000059], [99.79413000000005, 6.411670000000072], [99.85295000000008, 6.464150000000075], [99.85913000000005, 6.436390000000074], [99.86954000000003, 6.419300000000078]]], [[[102.09523000000007, 6.236140000000091], [102.12302000000005, 6.218050000000062], [102.16666000000004, 6.193610000000092], [102.18588000000005, 6.205730000000074], [102.22165000000007, 6.217500000000086], [102.31303000000003, 6.189440000000047], [102.33388000000008, 6.175550000000044], [102.35860000000008, 6.151670000000081], [102.38540000000006, 6.116530000000068], [102.41193000000004, 6.070830000000058], [102.43274000000008, 6.020000000000039], [102.48803000000004, 5.902640000000076], [102.50166000000007, 5.882080000000087], [102.53972000000005, 5.853170000000091], [102.58136000000007, 5.828610000000083], [102.60524000000004, 5.812220000000082], [102.62345000000005, 5.795690000000093], [102.64609000000007, 5.763470000000041], [102.66573000000005, 5.729860000000087], [102.84220000000005, 5.589300000000037], [102.87690000000003, 5.56833000000006], [102.92135000000007, 5.547430000000077], [102.96087000000006, 5.537010000000066], [103.03775000000007, 5.47694000000007], [103.06442000000004, 5.44805000000008], [103.09607000000005, 5.410280000000057], [103.12191000000007, 5.377360000000067], [103.18192000000005, 5.282780000000059], [103.20832000000007, 5.240550000000042], [103.22803000000005, 5.205550000000073], [103.24025000000006, 5.176940000000059], [103.24802000000005, 5.157500000000084], [103.26554000000004, 5.113330000000076], [103.27913000000007, 5.086110000000076], [103.35608000000008, 4.949170000000038], [103.40998000000008, 4.858050000000048], [103.44107000000008, 4.765280000000075], [103.45497000000006, 4.626940000000047], [103.45380000000006, 4.484790000000089], [103.46498000000003, 4.411670000000072], [103.47635000000008, 4.374720000000082], [103.48553000000004, 4.349860000000092], [103.49371000000008, 4.308750000000089], [103.48650000000004, 4.280550000000062], [103.46637000000004, 4.234440000000063], [103.44656000000003, 4.16644000000008], [103.41414000000003, 4.150760000000048], [103.39595000000003, 4.111390000000085], [103.39413000000008, 4.085000000000093], [103.40107000000006, 4.057780000000093], [103.40912000000003, 4.032220000000052], [103.41385000000008, 3.958890000000053], [103.37636000000003, 3.863060000000075], [103.33636000000007, 3.74410000000006], [103.37108000000006, 3.642780000000073], [103.38498000000004, 3.622220000000084], [103.42497000000003, 3.57278000000008], [103.44830000000007, 3.548060000000077], [103.46303000000006, 3.531810000000064], [103.47643000000005, 3.498680000000092], [103.45775000000003, 3.472780000000057], [103.44163000000003, 3.440140000000042], [103.42636000000005, 3.392500000000041], [103.42580000000004, 3.371670000000051], [103.42719000000005, 3.329720000000065], [103.43065000000007, 3.309720000000084], [103.43941000000007, 3.280560000000093], [103.44442000000004, 3.258330000000057], [103.45137000000005, 3.218330000000037], [103.45442000000003, 3.180970000000059], [103.45137000000005, 3.148610000000076], [103.44551000000007, 3.126530000000059], [103.43469000000005, 3.052780000000041], [103.43247000000008, 2.962220000000059], [103.43802000000005, 2.925830000000076], [103.45135000000005, 2.888190000000065], [103.46942000000007, 2.857780000000048], [103.48246000000006, 2.8366700000000833], [103.50165000000004, 2.808050000000094], [103.52246000000008, 2.780830000000094], [103.55469000000005, 2.7443100000000413], [103.59220000000005, 2.706110000000079], [103.61885000000007, 2.680560000000071], [103.63702000000006, 2.6640900000000443], [103.65331000000003, 2.660830000000089], [103.72775000000007, 2.640000000000043], [103.76526000000007, 2.625830000000064], [103.82025000000004, 2.575900000000047], [103.83386000000007, 2.517360000000053], [103.82706000000007, 2.476390000000037], [103.83637000000004, 2.455140000000085], [103.89832000000007, 2.385830000000055], [103.97746000000006, 2.243050000000039], [104.01969000000003, 2.136670000000038], [104.05830000000003, 2.059170000000051], [104.11580000000004, 1.966110000000071], [104.18830000000003, 1.8050000000000632], [104.22331000000003, 1.7179200000000492], [104.25359000000003, 1.633330000000057], [104.29329000000007, 1.437780000000088], ...]], [[[117.4333200000001, 6.628330000000062], [117.41235000000006, 6.6258300000000645], [117.35068000000001, 6.6409700000000385], [117.33859000000007, 6.649440000000084], [117.33527000000004, 6.658890000000042], [117.34274000000005, 6.672530000000052], [117.3986000000001, 6.676940000000059], [117.41278, 6.680000000000064], [117.42720000000008, 6.686110000000042], [117.43776000000003, 6.69264000000004], [117.44456000000002, 6.706110000000081], [117.43859000000009, 6.718330000000037], [117.42302000000007, 6.721670000000074], [117.40332000000001, 6.723120000000051], [117.40012000000002, 6.736800000000073], [117.4104000000001, 6.7470800000000395], [117.4679000000001, 6.761390000000063], [117.49192000000005, 6.744300000000067], [117.51486, 6.705830000000049], [117.51555000000008, 6.689440000000047], [117.51277000000005, 6.678610000000049], [117.50074000000006, 6.663330000000087], [117.46693000000005, 6.642500000000041], [117.45388000000003, 6.635000000000048], [117.44414000000006, 6.631110000000092], [117.4333200000001, 6.628330000000062]]], [[[117.59206000000006, 4.1698200000000725], [117.5288700000001, 4.175280000000043], [117.49775, 4.178890000000081], [117.47554000000002, 4.183610000000044], [117.45276000000001, 4.18861000000004], [117.43943000000002, 4.195830000000058], [117.42442000000005, 4.214720000000057], [117.4202600000001, 4.224720000000047], [117.41081000000008, 4.242500000000064], [117.40179, 4.254580000000089], [117.25179000000003, 4.353890000000092], [117.23944000000006, 4.35833000000008], [117.22360000000003, 4.358750000000043], [117.21111000000008, 4.354440000000068], [117.2027700000001, 4.345970000000079], [117.19179000000008, 4.336250000000064], [117.17665000000011, 4.335550000000069], [117.04387000000008, 4.336940000000084], [116.9369200000001, 4.350830000000087], [116.92442000000005, 4.352220000000045], [116.91053000000011, 4.352220000000045], [116.88916000000006, 4.349300000000085], [116.87693000000002, 4.345280000000059], [116.83985000000007, 4.33042000000006], [116.68877000000009, 4.33075000000008], [116.64194000000009, 4.334720000000061], [116.53360000000009, 4.330830000000049], [116.52762000000007, 4.319300000000055], [116.46582000000001, 4.294030000000077], [116.45416, 4.294580000000053], [116.4416500000001, 4.299440000000061], [116.42581000000007, 4.310000000000059], [116.31470000000002, 4.357780000000048], [116.15332000000001, 4.355000000000075], [116.1402700000001, 4.337220000000059], [116.07416, 4.283610000000067], [116.06110000000001, 4.2779200000000515], [116.04762000000005, 4.281110000000069], [116.03088000000002, 4.300760000000082], [116.0041500000001, 4.330000000000041], [115.98665000000005, 4.339720000000057], [115.97609, 4.343050000000062], [115.88804000000005, 4.36812000000009], [115.87248, 4.361110000000053], [115.85755000000006, 4.344100000000083], [115.85054000000002, 4.32167000000004], [115.7702700000001, 4.244720000000086], [115.76139, 4.239720000000091], [115.69081000000006, 4.180280000000039], [115.68331, 4.167360000000087], [115.6597200000001, 4.108600000000081], [115.66110000000003, 4.097780000000057], [115.66249000000005, 4.078330000000051], [115.61638000000005, 3.854170000000067], [115.58528000000001, 3.741670000000056], [115.57693000000006, 3.708610000000078], [115.57139000000006, 3.66611000000006], [115.57138000000009, 3.612780000000043], [115.57416, 3.594720000000052], [115.57887000000005, 3.585550000000069], [115.60193000000004, 3.539170000000069], [115.62608, 3.45778000000007], [115.62769000000003, 3.434300000000064], [115.61387000000002, 3.420420000000092], [115.59693000000004, 3.424720000000093], [115.58297000000005, 3.427990000000079], [115.57083, 3.4177800000000502], [115.55887000000007, 3.389170000000092], [115.55331000000001, 3.373890000000074], [115.53888000000006, 3.333610000000078], [115.53415000000007, 3.31833000000006], [115.52998000000002, 3.301670000000058], [115.51193, 3.2100000000000932], [115.50998000000004, 3.198330000000055], [115.51305000000002, 3.184030000000064], [115.52859000000001, 3.176110000000051], [115.4988800000001, 3.050280000000043], [115.49553000000003, 3.040000000000077], [115.48720000000003, 3.027500000000088], [115.37804000000006, 2.991800000000069], [115.31832000000009, 2.987780000000043], [115.31026000000008, 2.997780000000091], [115.30554000000006, 3.006670000000042], [115.30138000000011, 3.016390000000058], [115.24971000000005, 3.010830000000055], [115.15208000000007, 2.922080000000051], [115.13971000000004, 2.9061100000000692], [115.11832000000004, 2.851110000000062], [115.08236000000011, 2.613610000000051], [115.09206000000006, 2.600550000000055], [115.10762, 2.59722000000005], [115.12318000000005, 2.605550000000049], [115.1336, 2.611530000000073], [115.16944000000001, 2.605140000000062], [115.18525, 2.596940000000074], [115.19914000000006, 2.583050000000071], [115.2360900000001, 2.52965000000006], [115.23082000000011, 2.5080600000000572], [115.21568000000002, 2.492780000000039], [115.20387000000005, 2.487220000000093], ...]], [[[117.28298000000007, 7.319440000000043], [117.27832000000001, 7.250000000000057], [117.2763900000001, 7.238610000000051], [117.27304000000004, 7.228330000000085], [117.25054, 7.179170000000056], [117.19274000000007, 7.173330000000078], [117.17221000000006, 7.173330000000078], [117.1599900000001, 7.171940000000063], [117.14943000000005, 7.168610000000058], [117.1208200000001, 7.155550000000062], [117.09818000000007, 7.13722000000007], [117.0894300000001, 7.118890000000078], [117.07929000000001, 7.105000000000075], [117.06645000000003, 7.105070000000069], [117.05193000000008, 7.17083000000008], [117.06248000000005, 7.271670000000086], [117.07068000000004, 7.284030000000087], [117.08805000000007, 7.294170000000065], [117.0932600000001, 7.293450000000064], [117.14512000000002, 7.334030000000041], [117.22221000000002, 7.3527800000000525], [117.26818000000003, 7.343890000000044], [117.27832000000001, 7.333750000000066], [117.28298000000007, 7.319440000000043]]], [[[116.87471000000005, 7.221800000000087], [116.85694000000001, 7.183890000000076], [116.85234000000003, 7.188330000000064], [116.8787400000001, 7.274170000000083], [116.88666, 7.280280000000062], [117.00088000000005, 7.35292000000004], [117.00943000000007, 7.342220000000054], [117.01749000000007, 7.308330000000069], [117.01804000000004, 7.266740000000084], [116.9580400000001, 7.241670000000056], [116.90818000000002, 7.233470000000068], [116.87471000000005, 7.221800000000087]]]]
Thank you in advance,
Best regards.

How to get a certain value from a text file

I want to get a value from an API. However I am unable to tell Python what I want to do.
This is my current code:
response = requests.get('https://sms-service-online.com/api/getServicesAndCost/?country=0&operator=any&lang=en')
data = response.json()
plain = data["data"]
However the data which I want to display in my script is in the ["data"] part of the json. It is kind of a json inside a json.
For example: with
print(plain)
I would recieve this data:
[{"cost":"0.45","id":0,"servise":"VK.com","serviseImg":"bg-vk","number":"Numbers: 3047","value":"vk"},{"cost":"0.07","id":1,"servise":"OK.ru","serviseImg":"bg-ok","number":"Numbers: 14397","value":"ok"},{"cost":"0.15","id":2,"servise":"Whatsapp","serviseImg":"bg-wa","number":"Numbers: 17610","value":"wa"},{"cost":"0.18","id":3,"servise":"Viber","serviseImg":"bg-vi","number":"Numbers: 413","value":"vi"},{"cost":"0.00","id":4,"servise":"Telegram","serviseImg":"bg-tg","number":"Numbers: 0","value":"tg"},{"cost":"0.30","id":5,"servise":"WeChat","serviseImg":"bg-wb","number":"Numbers: 28389","value":"wb"},{"cost":"0.15","id":6,"servise":"Google,youtube,Gmail","serviseImg":"bg-go","number":"Numbers: 15419","value":"go"},{"cost":"0.11","id":7,"servise":"avito","serviseImg":"bg-av","number":"Numbers: 17379","value":"av"},{"cost":"0.07","id":8,"servise":"facebook","serviseImg":"bg-fb","number":"Numbers: 21636","value":"fb"},{"cost":"0.03","id":9,"servise":"Twitter","serviseImg":"bg-tw","number":"Numbers: 26864","value":"tw"},{"cost":"0.05","id":10,"servise":"Uber","serviseImg":"bg-ub","number":"Numbers: 20975","value":"ub"},{"cost":"0.22","id":11,"servise":"Qiwi","serviseImg":"bg-qw","number":"Numbers: 20371","value":"qw"},{"cost":"0.02","id":12,"servise":"Gett","serviseImg":"bg-gt","number":"Numbers: 28501","value":"gt"},{"cost":"0.00","id":13,"servise":"OLX","serviseImg":"bg-sn","number":"Numbers: 0","value":"sn"},{"cost":"0.14","id":14,"servise":"Instagram","serviseImg":"bg-ig","number":"Numbers: 3799","value":"ig"},{"cost":"0.00","id":15,"servise":"Hezzl","serviseImg":"bg-ss","number":"Numbers: 0","value":"ss"},{"cost":"0.07","id":16,"servise":"\u042e\u043b\u0430","serviseImg":"bg-ym","number":"Numbers: 17597","value":"ym"},{"cost":"0.03","id":17,"servise":"Mail.ru","serviseImg":"bg-ma","number":"Numbers: 17936","value":"ma"},{"cost":"0.03","id":18,"servise":"Microsoft","serviseImg":"bg-mm","number":"Numbers: 3830","value":"mm"},{"cost":"0.03","id":19,"servise":"Airbnb","serviseImg":"bg-uk","number":"Numbers: 28266","value":"uk"},{"cost":"0.00","id":20,"servise":"Line messenger","serviseImg":"bg-me","number":"Numbers: 0","value":"me"},{"cost":"0.03","id":21,"servise":"Yahoo","serviseImg":"bg-mb","number":"Numbers: 19077","value":"mb"},{"cost":"0.00","id":22,"servise":"Drugvokrug.ru","serviseImg":"bg-we","number":"Numbers: 0","value":"we"},{"cost":"0.05","id":23,"servise":"5ka.ru","serviseImg":"bg-bd","number":"Numbers: 27541","value":"bd"},{"cost":"0.00","id":24,"servise":"HQ Trivia","serviseImg":"bg-kp","number":"Numbers: 0","value":"kp"},{"cost":"0.65","id":25,"servise":"Delivery Club","serviseImg":"bg-dt","number":"Numbers: 26812","value":"dt"},{"cost":"0.03","id":26,"servise":"Yandex","serviseImg":"bg-ya","number":"Numbers: 20944","value":"ya"},{"cost":"0.05","id":27,"servise":"Steam","serviseImg":"bg-mt","number":"Numbers: 28121","value":"mt"},{"cost":"0.04","id":28,"servise":"Tinder","serviseImg":"bg-oi","number":"Numbers: 27478","value":"oi"},{"cost":"0.02","id":29,"servise":"Mamba, MeetMe","serviseImg":"bg-fd","number":"Numbers: 25328","value":"fd"},{"cost":"0.00","id":30,"servise":"Dent","serviseImg":"bg-zz","number":"Numbers: 0","value":"zz"},{"cost":"0.07","id":31,"servise":"KakaoTalk","serviseImg":"bg-kt","number":"Numbers: 27823","value":"kt"},{"cost":"0.04","id":32,"servise":"AOL","serviseImg":"bg-pm","number":"Numbers: 23369","value":"pm"},{"cost":"0.02","id":33,"servise":"LinkedIN","serviseImg":"bg-tn","number":"Numbers: 32192","value":"tn"},{"cost":"0.03","id":34,"servise":"Tencent QQ","serviseImg":"bg-qq","number":"Numbers: 27883","value":"qq"},{"cost":"0.06","id":35,"servise":"Magnit","serviseImg":"bg-mg","number":"Numbers: 993","value":"mg"},{"cost":"0.00","id":36,"servise":"pof.com","serviseImg":"bg-pf","number":"Numbers: 0","value":"pf"},{"cost":"0.03","id":37,"servise":"Yalla","serviseImg":"bg-yl","number":"Numbers: 27822","value":"yl"},{"cost":"0.00","id":38,"servise":"kolesa.kz","serviseImg":"bg-kl","number":"Numbers: 0","value":"kl"},{"cost":"0.03","id":39,"servise":"premium.one","serviseImg":"bg-po","number":"Numbers: 25869","value":"po"},{"cost":"0.07","id":40,"servise":"Naver","serviseImg":"bg-nv","number":"Numbers: 27582","value":"nv"},{"cost":"0.03","id":41,"servise":"Netflix","serviseImg":"bg-nf","number":"Numbers: 27715","value":"nf"},{"cost":"0.00","id":42,"servise":"icq","serviseImg":"bg-iq","number":"Numbers: 0","value":"iq"},{"cost":"0.00","id":43,"servise":"Onlinerby","serviseImg":"bg-ob","number":"Numbers: 0","value":"ob"},{"cost":"0.00","id":44,"servise":"kufarby","serviseImg":"bg-kb","number":"Numbers: 0","value":"kb"},{"cost":"0.03","id":45,"servise":"Imo","serviseImg":"bg-im","number":"Numbers: 25198","value":"im"},{"cost":"0.00","id":46,"servise":"Michat","serviseImg":"bg-mc","number":"Numbers: 0","value":"mc"},{"cost":"0.03","id":47,"servise":"Discord","serviseImg":"bg-ds","number":"Numbers: 22011","value":"ds"},{"cost":"0.00","id":48,"servise":"Seosprint","serviseImg":"bg-vv","number":"Numbers: 0","value":"vv"},{"cost":"0.00","id":49,"servise":"Monobank","serviseImg":"bg-ji","number":"Numbers: 0","value":"ji"},{"cost":"0.03","id":50,"servise":"TikTok\/Douyin","serviseImg":"bg-lf","number":"Numbers: 26299","value":"lf"},{"cost":"0.00","id":51,"servise":"Ukrnet","serviseImg":"bg-hu","number":"Numbers: 0","value":"hu"},{"cost":"0.00","id":52,"servise":"Skout","serviseImg":"bg-wg","number":"Numbers: 0","value":"wg"},{"cost":"0.00","id":53,"servise":"EasyPay","serviseImg":"bg-rz","number":"Numbers: 0","value":"rz"},{"cost":"0.00","id":54,"servise":"Q12 Trivia","serviseImg":"bg-vf","number":"Numbers: 0","value":"vf"},{"cost":"0.00","id":55,"servise":"Pyro Music","serviseImg":"bg-ny","number":"Numbers: 0","value":"ny"},{"cost":"0.00","id":56,"servise":"Wolt","serviseImg":"bg-rr","number":"Numbers: 0","value":"rr"},{"cost":"0.00","id":57,"servise":"CliQQ","serviseImg":"bg-fe","number":"Numbers: 0","value":"fe"},{"cost":"0.00","id":58,"servise":"ssoidnet","serviseImg":"bg-la","number":"Numbers: 0","value":"la"},{"cost":"0.00","id":59,"servise":"Zoho","serviseImg":"bg-zh","number":"Numbers: 0","value":"zh"},{"cost":"0.00","id":60,"servise":"Ticketmaster","serviseImg":"bg-gp","number":"Numbers: 0","value":"gp"},{"cost":"0.05","id":61,"servise":"Amazon","serviseImg":"bg-am","number":"Numbers: 25313","value":"am"},{"cost":"0.00","id":62,"servise":"Olacabs","serviseImg":"bg-ly","number":"Numbers: 0","value":"ly"},{"cost":"0.00","id":63,"servise":"Rambler","serviseImg":"bg-tc","number":"Numbers: 0","value":"tc"},{"cost":"0.02","id":64,"servise":"ProtonMail","serviseImg":"bg-dp","number":"Numbers: 30668","value":"dp"},{"cost":"0.00","id":65,"servise":"NRJ Music Awards","serviseImg":"bg-pg","number":"Numbers: 0","value":"pg"},{"cost":"0.03","id":66,"servise":"Citymobil","serviseImg":"bg-yf","number":"Numbers: 26997","value":"yf"},{"cost":"0.00","id":67,"servise":"MIRATORG","serviseImg":"bg-op","number":"Numbers: 0","value":"op"},{"cost":"0.03","id":68,"servise":"PGbonus","serviseImg":"bg-fx","number":"Numbers: 27563","value":"fx"},{"cost":"0.03","id":69,"servise":"MEGA","serviseImg":"bg-qr","number":"Numbers: 27848","value":"qr"},{"cost":"0.03","id":70,"servise":"SportMaster","serviseImg":"bg-yk","number":"Numbers: 26584","value":"yk"},{"cost":"0.03","id":71,"servise":"Careem","serviseImg":"bg-ls","number":"Numbers: 27873","value":"ls"},{"cost":"0.03","id":72,"servise":"BIGO LIVE","serviseImg":"bg-bl","number":"Numbers: 25421","value":"bl"},{"cost":"0.03","id":73,"servise":"MyMusicTaste","serviseImg":"bg-mu","number":"Numbers: 27898","value":"mu"},{"cost":"0.03","id":74,"servise":"Snapchat","serviseImg":"bg-fu","number":"Numbers: 27758","value":"fu"},{"cost":"0.00","id":75,"servise":"Keybase","serviseImg":"bg-bf","number":"Numbers: 0","value":"bf"},{"cost":"0.03","id":76,"servise":"OZON","serviseImg":"bg-sg","number":"Numbers: 26595","value":"sg"},{"cost":"0.03","id":77,"servise":"Wildberries","serviseImg":"bg-uu","number":"Numbers: 27220","value":"uu"},{"cost":"0.05","id":78,"servise":"BlaBlaCar","serviseImg":"bg-ua","number":"Numbers: 24367","value":"ua"},{"cost":"0.09","id":79,"servise":"Alibaba","serviseImg":"bg-ab","number":"Numbers: 17818","value":"ab"},{"cost":"0.00","id":80,"servise":"Inboxlv","serviseImg":"bg-iv","number":"Numbers: 0","value":"iv"},{"cost":"0.00","id":81,"servise":"Nttgame","serviseImg":"bg-zy","number":"Numbers: 0","value":"zy"},{"cost":"0.00","id":82,"servise":"Surveytime","serviseImg":"bg-gd","number":"Numbers: 0","value":"gd"},{"cost":"0.00","id":83,"servise":"Mylove","serviseImg":"bg-fy","number":"Numbers: 0","value":"fy"},{"cost":"0.02","id":84,"servise":"mosru","serviseImg":"bg-ce","number":"Numbers: 27173","value":"ce"},{"cost":"0.00","id":85,"servise":"Truecaller","serviseImg":"bg-tl","number":"Numbers: 0","value":"tl"},{"cost":"0.00","id":86,"servise":"Globus","serviseImg":"bg-hm","number":"Numbers: 0","value":"hm"},{"cost":"0.03","id":87,"servise":"Bolt","serviseImg":"bg-tx","number":"Numbers: 27378","value":"tx"},{"cost":"0.00","id":88,"servise":"Shopee","serviseImg":"bg-ka","number":"Numbers: 0","value":"ka"},{"cost":"0.03","id":89,"servise":"Perekrestok.ru","serviseImg":"bg-pl","number":"Numbers: 27883","value":"pl"},{"cost":"0.03","id":90,"servise":"Burger King","serviseImg":"bg-ip","number":"Numbers: 27764","value":"ip"},{"cost":"0.00","id":91,"servise":"Prom","serviseImg":"bg-cm","number":"Numbers: 0","value":"cm"},{"cost":"0.03","id":92,"servise":"AliPay","serviseImg":"bg-hw","number":"Numbers: 27166","value":"hw"},{"cost":"0.00","id":93,"servise":"Karusel","serviseImg":"bg-de","number":"Numbers: 0","value":"de"},{"cost":"0.00","id":94,"servise":"IVI","serviseImg":"bg-jc","number":"Numbers: 0","value":"jc"},{"cost":"0.03","id":95,"servise":"inDriver","serviseImg":"bg-rl","number":"Numbers: 27534","value":"rl"},{"cost":"0.03","id":96,"servise":"Happn","serviseImg":"bg-df","number":"Numbers: 27785","value":"df"},{"cost":"0.00","id":97,"servise":"RuTube","serviseImg":"bg-ui","number":"Numbers: 0","value":"ui"},{"cost":"0.03","id":98,"servise":"Magnolia","serviseImg":"bg-up","number":"Numbers: 27884","value":"up"},{"cost":"0.03","id":99,"servise":"Foodpanda","serviseImg":"bg-nz","number":"Numbers: 27493","value":"nz"},{"cost":"0.00","id":100,"servise":"Weibo","serviseImg":"bg-kf","number":"Numbers: 0","value":"kf"},{"cost":"0.00","id":101,"servise":"BillMill","serviseImg":"bg-ri","number":"Numbers: 0","value":"ri"},{"cost":"0.00","id":102,"servise":"Quipp","serviseImg":"bg-cc","number":"Numbers: 0","value":"cc"},{"cost":"0.00","id":103,"servise":"Okta","serviseImg":"bg-lr","number":"Numbers: 0","value":"lr"},{"cost":"0.03","id":104,"servise":"JDcom","serviseImg":"bg-za","number":"Numbers: 27891","value":"za"},{"cost":"0.05","id":105,"servise":"MTS CashBack","serviseImg":"bg-da","number":"Numbers: 12860","value":"da"},{"cost":"0.00","id":106,"servise":"Fiqsy","serviseImg":"bg-ug","number":"Numbers: 0","value":"ug"},{"cost":"0.00","id":107,"servise":"KuCoinPlay","serviseImg":"bg-sq","number":"Numbers: 0","value":"sq"},{"cost":"0.00","id":108,"servise":"Papara","serviseImg":"bg-zr","number":"Numbers: 0","value":"zr"},{"cost":"0.00","id":109,"servise":"Wish","serviseImg":"bg-xv","number":"Numbers: 0","value":"xv"},{"cost":"0.00","id":110,"servise":"Icrypex","serviseImg":"bg-cx","number":"Numbers: 0","value":"cx"},{"cost":"0.00","id":111,"servise":"PaddyPower","serviseImg":"bg-cw","number":"Numbers: 0","value":"cw"},{"cost":"0.05","id":112,"servise":"Baidu","serviseImg":"bg-li","number":"Numbers: 27813","value":"li"},{"cost":"0.00","id":113,"servise":"Dominos Pizza","serviseImg":"bg-dz","number":"Numbers: 0","value":"dz"},{"cost":"0.00","id":114,"servise":"paycell","serviseImg":"bg-xz","number":"Numbers: 0","value":"xz"},{"cost":"0.03","id":115,"servise":"Lenta","serviseImg":"bg-rd","number":"Numbers: 27651","value":"rd"},{"cost":"0.00","id":116,"servise":"Payberry","serviseImg":"bg-qb","number":"Numbers: 0","value":"qb"},{"cost":"0.03","id":117,"servise":"Drom","serviseImg":"bg-hz","number":"Numbers: 27673","value":"hz"},{"cost":"0.00","id":118,"servise":"GlobalTel","serviseImg":"bg-gl","number":"Numbers: 0","value":"gl"},{"cost":"0.00","id":119,"servise":"Deliveroo","serviseImg":"bg-zk","number":"Numbers: 0","value":"zk"},{"cost":"0.00","id":120,"servise":"Socios","serviseImg":"bg-ia","number":"Numbers: 0","value":"ia"},{"cost":"0.00","id":121,"servise":"Wmaraci","serviseImg":"bg-xl","number":"Numbers: 0","value":"xl"},{"cost":"0.00","id":122,"servise":"Yemeksepeti","serviseImg":"bg-yi","number":"Numbers: 0","value":"yi"},{"cost":"0.00","id":123,"servise":"Nike","serviseImg":"bg-ew","number":"Numbers: 0","value":"ew"},{"cost":"0.02","id":124,"servise":"myGLO","serviseImg":"bg-ae","number":"Numbers: 31671","value":"ae"},{"cost":"0.02","id":125,"servise":"YouStar","serviseImg":"bg-gb","number":"Numbers: 31133","value":"gb"},{"cost":"0.15","id":126,"servise":"\u0420\u0421\u0410","serviseImg":"bg-cy","number":"Numbers: 25178","value":"cy"},{"cost":"0.00","id":127,"servise":"RosaKhutor","serviseImg":"bg-qm","number":"Numbers: 0","value":"qm"},{"cost":"0.00","id":128,"servise":"eBay","serviseImg":"bg-dh","number":"Numbers: 0","value":"dh"},{"cost":"0.00","id":129,"servise":"Pay.kvartplata.ru+","serviseImg":"bg-yb","number":"Numbers: 0","value":"yb"},{"cost":"0.00","id":130,"servise":"GG","serviseImg":"bg-qe","number":"Numbers: 0","value":"qe"},{"cost":"0.03","id":131,"servise":"Grindr","serviseImg":"bg-yw","number":"Numbers: 4841","value":"yw"},{"cost":"0.00","id":132,"servise":"OffGamers","serviseImg":"bg-uz","number":"Numbers: 0","value":"uz"},{"cost":"0.00","id":133,"servise":"Hepsiburadacom","serviseImg":"bg-gx","number":"Numbers: 0","value":"gx"},{"cost":"0.00","id":134,"servise":"Coinbase","serviseImg":"bg-re","number":"Numbers: 0","value":"re"},{"cost":"0.00","id":135,"servise":"RADA NABU","serviseImg":"bg-tj","number":"Numbers: 0","value":"tj"},{"cost":"0.09","id":136,"servise":"PayPal","serviseImg":"bg-ts","number":"Numbers: 27144","value":"ts"},{"cost":"0.00","id":137,"servise":"hily","serviseImg":"bg-rt","number":"Numbers: 0","value":"rt"},{"cost":"0.00","id":138,"servise":"SneakersnStuff","serviseImg":"bg-sf","number":"Numbers: 0","value":"sf"},{"cost":"0.00","id":139,"servise":"Dostavista","serviseImg":"bg-sv","number":"Numbers: 0","value":"sv"},{"cost":"0.00","id":140,"servise":"32red","serviseImg":"bg-qi","number":"Numbers: 0","value":"qi"},{"cost":"0.02","id":141,"servise":"Blizzard","serviseImg":"bg-bz","number":"Numbers: 27797","value":"bz"},{"cost":"0.00","id":142,"servise":"ezbuy","serviseImg":"bg-db","number":"Numbers: 0","value":"db"},{"cost":"0.00","id":143,"servise":"CoinField","serviseImg":"bg-vw","number":"Numbers: 0","value":"vw"},{"cost":"0.00","id":144,"servise":"Airtel","serviseImg":"bg-zl","number":"Numbers: 0","value":"zl"},{"cost":"0.00","id":145,"servise":"Airtel","serviseImg":"bg-wf","number":"Numbers: 0","value":"wf"},{"cost":"0.00","id":146,"servise":"MrGreen","serviseImg":"bg-lw","number":"Numbers: 0","value":"lw"},{"cost":"0.00","id":147,"servise":"Rediffmail","serviseImg":"bg-co","number":"Numbers: 0","value":"co"},{"cost":"0.00","id":148,"servise":"miloan","serviseImg":"bg-ey","number":"Numbers: 0","value":"ey"},{"cost":"0.00","id":149,"servise":"Paytm","serviseImg":"bg-ge","number":"Numbers: 0","value":"ge"},{"cost":"0.00","id":150,"servise":"Dhani","serviseImg":"bg-os","number":"Numbers: 0","value":"os"},{"cost":"0.00","id":151,"servise":"CMTcuzdan","serviseImg":"bg-ql","number":"Numbers: 0","value":"ql"},{"cost":"0.00","id":152,"servise":"Mercado","serviseImg":"bg-cq","number":"Numbers: 0","value":"cq"},{"cost":"0.05","id":153,"servise":"DiDi","serviseImg":"bg-xk","number":"Numbers: 26447","value":"xk"},{"cost":"0.00","id":154,"servise":"Monese","serviseImg":"bg-py","number":"Numbers: 0","value":"py"},{"cost":"0.00","id":155,"servise":"Kotak811","serviseImg":"bg-rv","number":"Numbers: 0","value":"rv"},{"cost":"0.00","id":156,"servise":"Hopi","serviseImg":"bg-jl","number":"Numbers: 0","value":"jl"},{"cost":"0.00","id":157,"servise":"Trendyol","serviseImg":"bg-pr","number":"Numbers: 0","value":"pr"},{"cost":"0.00","id":158,"servise":"Justdating","serviseImg":"bg-pu","number":"Numbers: 0","value":"pu"},{"cost":"0.00","id":159,"servise":"Pairs","serviseImg":"bg-dk","number":"Numbers: 0","value":"dk"},{"cost":"0.00","id":160,"servise":"Touchance","serviseImg":"bg-fm","number":"Numbers: 0","value":"fm"},{"cost":"0.00","id":161,"servise":"SnappFood","serviseImg":"bg-ph","number":"Numbers: 0","value":"ph"},{"cost":"0.00","id":162,"servise":"NCsoft","serviseImg":"bg-sw","number":"Numbers: 0","value":"sw"},{"cost":"0.00","id":163,"servise":"Tosla","serviseImg":"bg-nr","number":"Numbers: 0","value":"nr"},{"cost":"0.00","id":164,"servise":"Ininal","serviseImg":"bg-hy","number":"Numbers: 0","value":"hy"},{"cost":"0.00","id":165,"servise":"Paysend","serviseImg":"bg-tr","number":"Numbers: 0","value":"tr"},{"cost":"0.00","id":166,"servise":"CDkeys","serviseImg":"bg-pq","number":"Numbers: 0","value":"pq"},{"cost":"0.00","id":167,"servise":"AVON","serviseImg":"bg-ff","number":"Numbers: 0","value":"ff"},{"cost":"0.03","id":168,"servise":"dodopizza","serviseImg":"bg-sd","number":"Numbers: 27739","value":"sd"},{"cost":"0.24","id":169,"servise":"McDonalds","serviseImg":"bg-ry","number":"Numbers: 7729","value":"ry"},{"cost":"0.00","id":170,"servise":"E bike Gewinnspiel","serviseImg":"bg-le","number":"Numbers: 0","value":"le"},{"cost":"0.00","id":171,"servise":"JKF","serviseImg":"bg-hr","number":"Numbers: 0","value":"hr"},{"cost":"0.00","id":172,"servise":"MyFishka","serviseImg":"bg-qa","number":"Numbers: 0","value":"qa"},{"cost":"0.00","id":173,"servise":"Craigslist","serviseImg":"bg-wc","number":"Numbers: 0","value":"wc"},{"cost":"0.00","id":174,"servise":"Foody","serviseImg":"bg-kw","number":"Numbers: 0","value":"kw"},{"cost":"0.00","id":175,"servise":"Grab","serviseImg":"bg-jg","number":"Numbers: 0","value":"jg"},{"cost":"0.05","id":176,"servise":"Zalo","serviseImg":"bg-mj","number":"Numbers: 28606","value":"mj"},{"cost":"0.00","id":177,"servise":"LiveScore","serviseImg":"bg-eu","number":"Numbers: 0","value":"eu"},{"cost":"0.00","id":178,"servise":"888casino","serviseImg":"bg-ll","number":"Numbers: 0","value":"ll"},{"cost":"0.00","id":179,"servise":"Gamer","serviseImg":"bg-ed","number":"Numbers: 0","value":"ed"},{"cost":"0.00","id":180,"servise":"Huya","serviseImg":"bg-pp","number":"Numbers: 0","value":"pp"},{"cost":"0.00","id":181,"servise":"WestStein","serviseImg":"bg-th","number":"Numbers: 0","value":"th"},{"cost":"0.04","id":182,"servise":"Tango","serviseImg":"bg-xr","number":"Numbers: 27765","value":"xr"},{"cost":"0.00","id":183,"servise":"Global24","serviseImg":"bg-iz","number":"Numbers: 0","value":"iz"},{"cost":"0.03","id":184,"servise":"\u041c\u0412\u0438\u0434\u0435\u043e","serviseImg":"bg-tk","number":"Numbers: 27660","value":"tk"},{"cost":"0.00","id":185,"servise":"Sheerid","serviseImg":"bg-rx","number":"Numbers: 0","value":"rx"},{"cost":"0.00","id":186,"servise":"99app","serviseImg":"bg-ki","number":"Numbers: 0","value":"ki"},{"cost":"0.00","id":187,"servise":"CAIXA","serviseImg":"bg-my","number":"Numbers: 0","value":"my"},{"cost":"0.00","id":188,"servise":"OfferUp","serviseImg":"bg-zm","number":"Numbers: 0","value":"zm"},{"cost":"0.00","id":189,"servise":"Swvl","serviseImg":"bg-tq","number":"Numbers: 0","value":"tq"},{"cost":"0.00","id":190,"servise":"Haraj","serviseImg":"bg-au","number":"Numbers: 0","value":"au"},{"cost":"0.00","id":191,"servise":"Taksheel","serviseImg":"bg-ei","number":"Numbers: 0","value":"ei"},{"cost":"0.00","id":192,"servise":"hamrahaval","serviseImg":"bg-rp","number":"Numbers: 0","value":"rp"},{"cost":"0.00","id":193,"servise":"Gamekit","serviseImg":"bg-pa","number":"Numbers: 0","value":"pa"},{"cost":"0.00","id":194,"servise":" \u015eikayet var","serviseImg":"bg-fs","number":"Numbers: 0","value":"fs"},{"cost":"0.00","id":195,"servise":"Getir","serviseImg":"bg-ul","number":"Numbers: 0","value":"ul"},{"cost":"0.00","id":196,"servise":"irancell","serviseImg":"bg-cf","number":"Numbers: 0","value":"cf"},{"cost":"0.00","id":197,"servise":"Alfa","serviseImg":"bg-bt","number":"Numbers: 0","value":"bt"},{"cost":"0.00","id":198,"servise":"Disney Hotstar","serviseImg":"bg-ud","number":"Numbers: 0","value":"ud"},{"cost":"0.00","id":199,"servise":"Agroinform","serviseImg":"bg-qu","number":"Numbers: 0","value":"qu"},{"cost":"0.00","id":200,"servise":"humblebundle","serviseImg":"bg-un","number":"Numbers: 0","value":"un"},{"cost":"0.00","id":201,"servise":"Faberlic","serviseImg":"bg-rm","number":"Numbers: 0","value":"rm"},{"cost":"0.00","id":202,"servise":"CafeBazaar","serviseImg":"bg-uo","number":"Numbers: 0","value":"uo"},{"cost":"0.00","id":203,"servise":"cryptocom","serviseImg":"bg-ti","number":"Numbers: 0","value":"ti"},{"cost":"0.00","id":204,"servise":"Gittigidiyor","serviseImg":"bg-nk","number":"Numbers: 0","value":"nk"},{"cost":"0.00","id":205,"servise":"mzadqatar","serviseImg":"bg-jm","number":"Numbers: 0","value":"jm"},{"cost":"0.00","id":206,"servise":"Algida","serviseImg":"bg-lp","number":"Numbers: 0","value":"lp"},{"cost":"0.00","id":207,"servise":"Cita Previa","serviseImg":"bg-si","number":"Numbers: 0","value":"si"},{"cost":"0.00","id":208,"servise":"Potato Chat","serviseImg":"bg-fj","number":"Numbers: 0","value":"fj"},{"cost":"0.00","id":209,"servise":"Bitaqaty","serviseImg":"bg-pt","number":"Numbers: 0","value":"pt"},{"cost":"0.00","id":210,"servise":"Primaries 2020","serviseImg":"bg-qc","number":"Numbers: 0","value":"qc"},{"cost":"0.00","id":211,"servise":"Amasia","serviseImg":"bg-yo","number":"Numbers: 0","value":"yo"},{"cost":"0.00","id":212,"servise":"Dream11","serviseImg":"bg-ve","number":"Numbers: 0","value":"ve"},{"cost":"0.00","id":213,"servise":"Oriflame","serviseImg":"bg-qh","number":"Numbers: 0","value":"qh"},{"cost":"0.00","id":214,"servise":"Bykea","serviseImg":"bg-iu","number":"Numbers: 0","value":"iu"},{"cost":"0.00","id":215,"servise":"Immowelt","serviseImg":"bg-ib","number":"Numbers: 0","value":"ib"},{"cost":"0.00","id":216,"servise":"Digikala","serviseImg":"bg-zv","number":"Numbers: 0","value":"zv"},{"cost":"0.00","id":217,"servise":"Wing Money","serviseImg":"bg-jb","number":"Numbers: 0","value":"jb"},{"cost":"0.00","id":218,"servise":"Yaay","serviseImg":"bg-vn","number":"Numbers: 0","value":"vn"},{"cost":"0.00","id":219,"servise":"GameArena","serviseImg":"bg-wn","number":"Numbers: 0","value":"wn"},{"cost":"0.04","id":220,"servise":"Vita express","serviseImg":"bg-bj","number":"Numbers: 27861","value":"bj"},{"cost":"0.00","id":221,"servise":"Auchan","serviseImg":"bg-st","number":"Numbers: 0","value":"st"},{"cost":"0.00","id":222,"servise":"Picpay","serviseImg":"bg-ev","number":"Numbers: 0","value":"ev"},{"cost":"0.00","id":223,"servise":"Blued","serviseImg":"bg-qn","number":"Numbers: 0","value":"qn"},{"cost":"0.05","id":224,"servise":"Not on the list","serviseImg":"bg-ot","number":"Numbers: 19352","value":"ot"}]
The problem is that after my knowledge this is a wrong formatted json file, even if I remove "[" and "]".
I though of just looking at it as a text file to get a specific value but I was unable to find something on the internet about this topic.
I want to get the following value:
From:
{"cost":"0.00","id":123,"servise":"Nike","serviseImg":"bg-ew","number":"Numbers: 0","value":"ew"}
I want to get:
Numbers: 0
Use json.loads to become a dictionary query:
import requests
import json
response = requests.get('https://sms-service-online.com/api/getServicesAndCost/?country=0&operator=any&lang=en')
data = response.json()
plain = data["data"]
for d in json.loads(plain):
if d['id'] == 123:
print(d)
You have a list of dict in your first example. So first you need to select which dict you want. For instance, if your query is called 'json_list'
json_list[2]
will get you the third item in that list.
For what you are asking, try:
j = {"cost":"0.00","id":123,"servise":"Nike","serviseImg":"bg-ew","number":"Numbers: 0","value":"ew"}
j["number"].split()[-1]
Assuming you want to check all numbers in all dict, try:
json_list=[{"cost":"0.45","id":0,"servise":"VK.com","serviseImg":"bg-vk","number":"Numbers: 3047","value":"vk"},{"cost":"0.07","id":1,"servise":"OK.ru","serviseImg":"bg-ok","number":"Numbers: 14397","value":"ok"},{"cost":"0.15","id":2,"servise":"Whatsapp","serviseImg":"bg-wa","number":"Numbers: 17610","value":"wa"},{"cost":"0.18","id":3,"servise":"Viber","serviseImg":"bg-vi","number":"Numbers: 413","value":"vi"},{"cost":"0.00","id":4,"servise":"Telegram","serviseImg":"bg-tg","number":"Numbers: 0","value":"tg"},{"cost":"0.30","id":5,"servise":"WeChat","serviseImg":"bg-wb","number":"Numbers: 28389","value":"wb"},{"cost":"0.15","id":6,"servise":"Google,youtube,Gmail","serviseImg":"bg-go","number":"Numbers: 15419","value":"go"},{"cost":"0.11","id":7,"servise":"avito","serviseImg":"bg-av","number":"Numbers: 17379","value":"av"},{"cost":"0.07","id":8,"servise":"facebook","serviseImg":"bg-fb","number":"Numbers: 21636","value":"fb"},{"cost":"0.03","id":9,"servise":"Twitter","serviseImg":"bg-tw","number":"Numbers: 26864","value":"tw"},{"cost":"0.05","id":10,"servise":"Uber","serviseImg":"bg-ub","number":"Numbers: 20975","value":"ub"},{"cost":"0.22","id":11,"servise":"Qiwi","serviseImg":"bg-qw","number":"Numbers: 20371","value":"qw"},{"cost":"0.02","id":12,"servise":"Gett","serviseImg":"bg-gt","number":"Numbers: 28501","value":"gt"},{"cost":"0.00","id":13,"servise":"OLX","serviseImg":"bg-sn","number":"Numbers: 0","value":"sn"},{"cost":"0.14","id":14,"servise":"Instagram","serviseImg":"bg-ig","number":"Numbers: 3799","value":"ig"},{"cost":"0.00","id":15,"servise":"Hezzl","serviseImg":"bg-ss","number":"Numbers: 0","value":"ss"},{"cost":"0.07","id":16,"servise":"\u042e\u043b\u0430","serviseImg":"bg-ym","number":"Numbers: 17597","value":"ym"},{"cost":"0.03","id":17,"servise":"Mail.ru","serviseImg":"bg-ma","number":"Numbers: 17936","value":"ma"},{"cost":"0.03","id":18,"servise":"Microsoft","serviseImg":"bg-mm","number":"Numbers: 3830","value":"mm"},{"cost":"0.03","id":19,"servise":"Airbnb","serviseImg":"bg-uk","number":"Numbers: 28266","value":"uk"},{"cost":"0.00","id":20,"servise":"Line messenger","serviseImg":"bg-me","number":"Numbers: 0","value":"me"},{"cost":"0.03","id":21,"servise":"Yahoo","serviseImg":"bg-mb","number":"Numbers: 19077","value":"mb"},{"cost":"0.00","id":22,"servise":"Drugvokrug.ru","serviseImg":"bg-we","number":"Numbers: 0","value":"we"},{"cost":"0.05","id":23,"servise":"5ka.ru","serviseImg":"bg-bd","number":"Numbers: 27541","value":"bd"},{"cost":"0.00","id":24,"servise":"HQ Trivia","serviseImg":"bg-kp","number":"Numbers: 0","value":"kp"},{"cost":"0.65","id":25,"servise":"Delivery Club","serviseImg":"bg-dt","number":"Numbers: 26812","value":"dt"},{"cost":"0.03","id":26,"servise":"Yandex","serviseImg":"bg-ya","number":"Numbers: 20944","value":"ya"},{"cost":"0.05","id":27,"servise":"Steam","serviseImg":"bg-mt","number":"Numbers: 28121","value":"mt"},{"cost":"0.04","id":28,"servise":"Tinder","serviseImg":"bg-oi","number":"Numbers: 27478","value":"oi"},{"cost":"0.02","id":29,"servise":"Mamba, MeetMe","serviseImg":"bg-fd","number":"Numbers: 25328","value":"fd"},{"cost":"0.00","id":30,"servise":"Dent","serviseImg":"bg-zz","number":"Numbers: 0","value":"zz"},{"cost":"0.07","id":31,"servise":"KakaoTalk","serviseImg":"bg-kt","number":"Numbers: 27823","value":"kt"},{"cost":"0.04","id":32,"servise":"AOL","serviseImg":"bg-pm","number":"Numbers: 23369","value":"pm"},{"cost":"0.02","id":33,"servise":"LinkedIN","serviseImg":"bg-tn","number":"Numbers: 32192","value":"tn"},{"cost":"0.03","id":34,"servise":"Tencent QQ","serviseImg":"bg-qq","number":"Numbers: 27883","value":"qq"},{"cost":"0.06","id":35,"servise":"Magnit","serviseImg":"bg-mg","number":"Numbers: 993","value":"mg"},{"cost":"0.00","id":36,"servise":"pof.com","serviseImg":"bg-pf","number":"Numbers: 0","value":"pf"},{"cost":"0.03","id":37,"servise":"Yalla","serviseImg":"bg-yl","number":"Numbers: 27822","value":"yl"},{"cost":"0.00","id":38,"servise":"kolesa.kz","serviseImg":"bg-kl","number":"Numbers: 0","value":"kl"},{"cost":"0.03","id":39,"servise":"premium.one","serviseImg":"bg-po","number":"Numbers: 25869","value":"po"},{"cost":"0.07","id":40,"servise":"Naver","serviseImg":"bg-nv","number":"Numbers: 27582","value":"nv"},{"cost":"0.03","id":41,"servise":"Netflix","serviseImg":"bg-nf","number":"Numbers: 27715","value":"nf"},{"cost":"0.00","id":42,"servise":"icq","serviseImg":"bg-iq","number":"Numbers: 0","value":"iq"},{"cost":"0.00","id":43,"servise":"Onlinerby","serviseImg":"bg-ob","number":"Numbers: 0","value":"ob"},{"cost":"0.00","id":44,"servise":"kufarby","serviseImg":"bg-kb","number":"Numbers: 0","value":"kb"},{"cost":"0.03","id":45,"servise":"Imo","serviseImg":"bg-im","number":"Numbers: 25198","value":"im"},{"cost":"0.00","id":46,"servise":"Michat","serviseImg":"bg-mc","number":"Numbers: 0","value":"mc"},{"cost":"0.03","id":47,"servise":"Discord","serviseImg":"bg-ds","number":"Numbers: 22011","value":"ds"},{"cost":"0.00","id":48,"servise":"Seosprint","serviseImg":"bg-vv","number":"Numbers: 0","value":"vv"},{"cost":"0.00","id":49,"servise":"Monobank","serviseImg":"bg-ji","number":"Numbers: 0","value":"ji"},{"cost":"0.03","id":50,"servise":"TikTok\/Douyin","serviseImg":"bg-lf","number":"Numbers: 26299","value":"lf"},{"cost":"0.00","id":51,"servise":"Ukrnet","serviseImg":"bg-hu","number":"Numbers: 0","value":"hu"},{"cost":"0.00","id":52,"servise":"Skout","serviseImg":"bg-wg","number":"Numbers: 0","value":"wg"},{"cost":"0.00","id":53,"servise":"EasyPay","serviseImg":"bg-rz","number":"Numbers: 0","value":"rz"},{"cost":"0.00","id":54,"servise":"Q12 Trivia","serviseImg":"bg-vf","number":"Numbers: 0","value":"vf"},{"cost":"0.00","id":55,"servise":"Pyro Music","serviseImg":"bg-ny","number":"Numbers: 0","value":"ny"},{"cost":"0.00","id":56,"servise":"Wolt","serviseImg":"bg-rr","number":"Numbers: 0","value":"rr"},{"cost":"0.00","id":57,"servise":"CliQQ","serviseImg":"bg-fe","number":"Numbers: 0","value":"fe"},{"cost":"0.00","id":58,"servise":"ssoidnet","serviseImg":"bg-la","number":"Numbers: 0","value":"la"},{"cost":"0.00","id":59,"servise":"Zoho","serviseImg":"bg-zh","number":"Numbers: 0","value":"zh"},{"cost":"0.00","id":60,"servise":"Ticketmaster","serviseImg":"bg-gp","number":"Numbers: 0","value":"gp"},{"cost":"0.05","id":61,"servise":"Amazon","serviseImg":"bg-am","number":"Numbers: 25313","value":"am"},{"cost":"0.00","id":62,"servise":"Olacabs","serviseImg":"bg-ly","number":"Numbers: 0","value":"ly"},{"cost":"0.00","id":63,"servise":"Rambler","serviseImg":"bg-tc","number":"Numbers: 0","value":"tc"},{"cost":"0.02","id":64,"servise":"ProtonMail","serviseImg":"bg-dp","number":"Numbers: 30668","value":"dp"},{"cost":"0.00","id":65,"servise":"NRJ Music Awards","serviseImg":"bg-pg","number":"Numbers: 0","value":"pg"},{"cost":"0.03","id":66,"servise":"Citymobil","serviseImg":"bg-yf","number":"Numbers: 26997","value":"yf"},{"cost":"0.00","id":67,"servise":"MIRATORG","serviseImg":"bg-op","number":"Numbers: 0","value":"op"},{"cost":"0.03","id":68,"servise":"PGbonus","serviseImg":"bg-fx","number":"Numbers: 27563","value":"fx"},{"cost":"0.03","id":69,"servise":"MEGA","serviseImg":"bg-qr","number":"Numbers: 27848","value":"qr"},{"cost":"0.03","id":70,"servise":"SportMaster","serviseImg":"bg-yk","number":"Numbers: 26584","value":"yk"},{"cost":"0.03","id":71,"servise":"Careem","serviseImg":"bg-ls","number":"Numbers: 27873","value":"ls"},{"cost":"0.03","id":72,"servise":"BIGO LIVE","serviseImg":"bg-bl","number":"Numbers: 25421","value":"bl"},{"cost":"0.03","id":73,"servise":"MyMusicTaste","serviseImg":"bg-mu","number":"Numbers: 27898","value":"mu"},{"cost":"0.03","id":74,"servise":"Snapchat","serviseImg":"bg-fu","number":"Numbers: 27758","value":"fu"},{"cost":"0.00","id":75,"servise":"Keybase","serviseImg":"bg-bf","number":"Numbers: 0","value":"bf"},{"cost":"0.03","id":76,"servise":"OZON","serviseImg":"bg-sg","number":"Numbers: 26595","value":"sg"},{"cost":"0.03","id":77,"servise":"Wildberries","serviseImg":"bg-uu","number":"Numbers: 27220","value":"uu"},{"cost":"0.05","id":78,"servise":"BlaBlaCar","serviseImg":"bg-ua","number":"Numbers: 24367","value":"ua"},{"cost":"0.09","id":79,"servise":"Alibaba","serviseImg":"bg-ab","number":"Numbers: 17818","value":"ab"},{"cost":"0.00","id":80,"servise":"Inboxlv","serviseImg":"bg-iv","number":"Numbers: 0","value":"iv"},{"cost":"0.00","id":81,"servise":"Nttgame","serviseImg":"bg-zy","number":"Numbers: 0","value":"zy"},{"cost":"0.00","id":82,"servise":"Surveytime","serviseImg":"bg-gd","number":"Numbers: 0","value":"gd"},{"cost":"0.00","id":83,"servise":"Mylove","serviseImg":"bg-fy","number":"Numbers: 0","value":"fy"},{"cost":"0.02","id":84,"servise":"mosru","serviseImg":"bg-ce","number":"Numbers: 27173","value":"ce"},{"cost":"0.00","id":85,"servise":"Truecaller","serviseImg":"bg-tl","number":"Numbers: 0","value":"tl"},{"cost":"0.00","id":86,"servise":"Globus","serviseImg":"bg-hm","number":"Numbers: 0","value":"hm"},{"cost":"0.03","id":87,"servise":"Bolt","serviseImg":"bg-tx","number":"Numbers: 27378","value":"tx"},{"cost":"0.00","id":88,"servise":"Shopee","serviseImg":"bg-ka","number":"Numbers: 0","value":"ka"},{"cost":"0.03","id":89,"servise":"Perekrestok.ru","serviseImg":"bg-pl","number":"Numbers: 27883","value":"pl"},{"cost":"0.03","id":90,"servise":"Burger King","serviseImg":"bg-ip","number":"Numbers: 27764","value":"ip"},{"cost":"0.00","id":91,"servise":"Prom","serviseImg":"bg-cm","number":"Numbers: 0","value":"cm"},{"cost":"0.03","id":92,"servise":"AliPay","serviseImg":"bg-hw","number":"Numbers: 27166","value":"hw"},{"cost":"0.00","id":93,"servise":"Karusel","serviseImg":"bg-de","number":"Numbers: 0","value":"de"},{"cost":"0.00","id":94,"servise":"IVI","serviseImg":"bg-jc","number":"Numbers: 0","value":"jc"},{"cost":"0.03","id":95,"servise":"inDriver","serviseImg":"bg-rl","number":"Numbers: 27534","value":"rl"},{"cost":"0.03","id":96,"servise":"Happn","serviseImg":"bg-df","number":"Numbers: 27785","value":"df"},{"cost":"0.00","id":97,"servise":"RuTube","serviseImg":"bg-ui","number":"Numbers: 0","value":"ui"},{"cost":"0.03","id":98,"servise":"Magnolia","serviseImg":"bg-up","number":"Numbers: 27884","value":"up"},{"cost":"0.03","id":99,"servise":"Foodpanda","serviseImg":"bg-nz","number":"Numbers: 27493","value":"nz"},{"cost":"0.00","id":100,"servise":"Weibo","serviseImg":"bg-kf","number":"Numbers: 0","value":"kf"},{"cost":"0.00","id":101,"servise":"BillMill","serviseImg":"bg-ri","number":"Numbers: 0","value":"ri"},{"cost":"0.00","id":102,"servise":"Quipp","serviseImg":"bg-cc","number":"Numbers: 0","value":"cc"},{"cost":"0.00","id":103,"servise":"Okta","serviseImg":"bg-lr","number":"Numbers: 0","value":"lr"},{"cost":"0.03","id":104,"servise":"JDcom","serviseImg":"bg-za","number":"Numbers: 27891","value":"za"},{"cost":"0.05","id":105,"servise":"MTS CashBack","serviseImg":"bg-da","number":"Numbers: 12860","value":"da"},{"cost":"0.00","id":106,"servise":"Fiqsy","serviseImg":"bg-ug","number":"Numbers: 0","value":"ug"},{"cost":"0.00","id":107,"servise":"KuCoinPlay","serviseImg":"bg-sq","number":"Numbers: 0","value":"sq"},{"cost":"0.00","id":108,"servise":"Papara","serviseImg":"bg-zr","number":"Numbers: 0","value":"zr"},{"cost":"0.00","id":109,"servise":"Wish","serviseImg":"bg-xv","number":"Numbers: 0","value":"xv"},{"cost":"0.00","id":110,"servise":"Icrypex","serviseImg":"bg-cx","number":"Numbers: 0","value":"cx"},{"cost":"0.00","id":111,"servise":"PaddyPower","serviseImg":"bg-cw","number":"Numbers: 0","value":"cw"},{"cost":"0.05","id":112,"servise":"Baidu","serviseImg":"bg-li","number":"Numbers: 27813","value":"li"},{"cost":"0.00","id":113,"servise":"Dominos Pizza","serviseImg":"bg-dz","number":"Numbers: 0","value":"dz"},{"cost":"0.00","id":114,"servise":"paycell","serviseImg":"bg-xz","number":"Numbers: 0","value":"xz"},{"cost":"0.03","id":115,"servise":"Lenta","serviseImg":"bg-rd","number":"Numbers: 27651","value":"rd"},{"cost":"0.00","id":116,"servise":"Payberry","serviseImg":"bg-qb","number":"Numbers: 0","value":"qb"},{"cost":"0.03","id":117,"servise":"Drom","serviseImg":"bg-hz","number":"Numbers: 27673","value":"hz"},{"cost":"0.00","id":118,"servise":"GlobalTel","serviseImg":"bg-gl","number":"Numbers: 0","value":"gl"},{"cost":"0.00","id":119,"servise":"Deliveroo","serviseImg":"bg-zk","number":"Numbers: 0","value":"zk"},{"cost":"0.00","id":120,"servise":"Socios","serviseImg":"bg-ia","number":"Numbers: 0","value":"ia"},{"cost":"0.00","id":121,"servise":"Wmaraci","serviseImg":"bg-xl","number":"Numbers: 0","value":"xl"},{"cost":"0.00","id":122,"servise":"Yemeksepeti","serviseImg":"bg-yi","number":"Numbers: 0","value":"yi"},{"cost":"0.00","id":123,"servise":"Nike","serviseImg":"bg-ew","number":"Numbers: 0","value":"ew"},{"cost":"0.02","id":124,"servise":"myGLO","serviseImg":"bg-ae","number":"Numbers: 31671","value":"ae"},{"cost":"0.02","id":125,"servise":"YouStar","serviseImg":"bg-gb","number":"Numbers: 31133","value":"gb"},{"cost":"0.15","id":126,"servise":"\u0420\u0421\u0410","serviseImg":"bg-cy","number":"Numbers: 25178","value":"cy"},{"cost":"0.00","id":127,"servise":"RosaKhutor","serviseImg":"bg-qm","number":"Numbers: 0","value":"qm"},{"cost":"0.00","id":128,"servise":"eBay","serviseImg":"bg-dh","number":"Numbers: 0","value":"dh"},{"cost":"0.00","id":129,"servise":"Pay.kvartplata.ru+","serviseImg":"bg-yb","number":"Numbers: 0","value":"yb"},{"cost":"0.00","id":130,"servise":"GG","serviseImg":"bg-qe","number":"Numbers: 0","value":"qe"},{"cost":"0.03","id":131,"servise":"Grindr","serviseImg":"bg-yw","number":"Numbers: 4841","value":"yw"},{"cost":"0.00","id":132,"servise":"OffGamers","serviseImg":"bg-uz","number":"Numbers: 0","value":"uz"},{"cost":"0.00","id":133,"servise":"Hepsiburadacom","serviseImg":"bg-gx","number":"Numbers: 0","value":"gx"},{"cost":"0.00","id":134,"servise":"Coinbase","serviseImg":"bg-re","number":"Numbers: 0","value":"re"},{"cost":"0.00","id":135,"servise":"RADA NABU","serviseImg":"bg-tj","number":"Numbers: 0","value":"tj"},{"cost":"0.09","id":136,"servise":"PayPal","serviseImg":"bg-ts","number":"Numbers: 27144","value":"ts"},{"cost":"0.00","id":137,"servise":"hily","serviseImg":"bg-rt","number":"Numbers: 0","value":"rt"},{"cost":"0.00","id":138,"servise":"SneakersnStuff","serviseImg":"bg-sf","number":"Numbers: 0","value":"sf"},{"cost":"0.00","id":139,"servise":"Dostavista","serviseImg":"bg-sv","number":"Numbers: 0","value":"sv"},{"cost":"0.00","id":140,"servise":"32red","serviseImg":"bg-qi","number":"Numbers: 0","value":"qi"},{"cost":"0.02","id":141,"servise":"Blizzard","serviseImg":"bg-bz","number":"Numbers: 27797","value":"bz"},{"cost":"0.00","id":142,"servise":"ezbuy","serviseImg":"bg-db","number":"Numbers: 0","value":"db"},{"cost":"0.00","id":143,"servise":"CoinField","serviseImg":"bg-vw","number":"Numbers: 0","value":"vw"},{"cost":"0.00","id":144,"servise":"Airtel","serviseImg":"bg-zl","number":"Numbers: 0","value":"zl"},{"cost":"0.00","id":145,"servise":"Airtel","serviseImg":"bg-wf","number":"Numbers: 0","value":"wf"},{"cost":"0.00","id":146,"servise":"MrGreen","serviseImg":"bg-lw","number":"Numbers: 0","value":"lw"},{"cost":"0.00","id":147,"servise":"Rediffmail","serviseImg":"bg-co","number":"Numbers: 0","value":"co"},{"cost":"0.00","id":148,"servise":"miloan","serviseImg":"bg-ey","number":"Numbers: 0","value":"ey"},{"cost":"0.00","id":149,"servise":"Paytm","serviseImg":"bg-ge","number":"Numbers: 0","value":"ge"},{"cost":"0.00","id":150,"servise":"Dhani","serviseImg":"bg-os","number":"Numbers: 0","value":"os"},{"cost":"0.00","id":151,"servise":"CMTcuzdan","serviseImg":"bg-ql","number":"Numbers: 0","value":"ql"},{"cost":"0.00","id":152,"servise":"Mercado","serviseImg":"bg-cq","number":"Numbers: 0","value":"cq"},{"cost":"0.05","id":153,"servise":"DiDi","serviseImg":"bg-xk","number":"Numbers: 26447","value":"xk"},{"cost":"0.00","id":154,"servise":"Monese","serviseImg":"bg-py","number":"Numbers: 0","value":"py"},{"cost":"0.00","id":155,"servise":"Kotak811","serviseImg":"bg-rv","number":"Numbers: 0","value":"rv"},{"cost":"0.00","id":156,"servise":"Hopi","serviseImg":"bg-jl","number":"Numbers: 0","value":"jl"},{"cost":"0.00","id":157,"servise":"Trendyol","serviseImg":"bg-pr","number":"Numbers: 0","value":"pr"},{"cost":"0.00","id":158,"servise":"Justdating","serviseImg":"bg-pu","number":"Numbers: 0","value":"pu"},{"cost":"0.00","id":159,"servise":"Pairs","serviseImg":"bg-dk","number":"Numbers: 0","value":"dk"},{"cost":"0.00","id":160,"servise":"Touchance","serviseImg":"bg-fm","number":"Numbers: 0","value":"fm"},{"cost":"0.00","id":161,"servise":"SnappFood","serviseImg":"bg-ph","number":"Numbers: 0","value":"ph"},{"cost":"0.00","id":162,"servise":"NCsoft","serviseImg":"bg-sw","number":"Numbers: 0","value":"sw"},{"cost":"0.00","id":163,"servise":"Tosla","serviseImg":"bg-nr","number":"Numbers: 0","value":"nr"},{"cost":"0.00","id":164,"servise":"Ininal","serviseImg":"bg-hy","number":"Numbers: 0","value":"hy"},{"cost":"0.00","id":165,"servise":"Paysend","serviseImg":"bg-tr","number":"Numbers: 0","value":"tr"},{"cost":"0.00","id":166,"servise":"CDkeys","serviseImg":"bg-pq","number":"Numbers: 0","value":"pq"},{"cost":"0.00","id":167,"servise":"AVON","serviseImg":"bg-ff","number":"Numbers: 0","value":"ff"},{"cost":"0.03","id":168,"servise":"dodopizza","serviseImg":"bg-sd","number":"Numbers: 27739","value":"sd"},{"cost":"0.24","id":169,"servise":"McDonalds","serviseImg":"bg-ry","number":"Numbers: 7729","value":"ry"},{"cost":"0.00","id":170,"servise":"E bike Gewinnspiel","serviseImg":"bg-le","number":"Numbers: 0","value":"le"},{"cost":"0.00","id":171,"servise":"JKF","serviseImg":"bg-hr","number":"Numbers: 0","value":"hr"},{"cost":"0.00","id":172,"servise":"MyFishka","serviseImg":"bg-qa","number":"Numbers: 0","value":"qa"},{"cost":"0.00","id":173,"servise":"Craigslist","serviseImg":"bg-wc","number":"Numbers: 0","value":"wc"},{"cost":"0.00","id":174,"servise":"Foody","serviseImg":"bg-kw","number":"Numbers: 0","value":"kw"},{"cost":"0.00","id":175,"servise":"Grab","serviseImg":"bg-jg","number":"Numbers: 0","value":"jg"},{"cost":"0.05","id":176,"servise":"Zalo","serviseImg":"bg-mj","number":"Numbers: 28606","value":"mj"},{"cost":"0.00","id":177,"servise":"LiveScore","serviseImg":"bg-eu","number":"Numbers: 0","value":"eu"},{"cost":"0.00","id":178,"servise":"888casino","serviseImg":"bg-ll","number":"Numbers: 0","value":"ll"},{"cost":"0.00","id":179,"servise":"Gamer","serviseImg":"bg-ed","number":"Numbers: 0","value":"ed"},{"cost":"0.00","id":180,"servise":"Huya","serviseImg":"bg-pp","number":"Numbers: 0","value":"pp"},{"cost":"0.00","id":181,"servise":"WestStein","serviseImg":"bg-th","number":"Numbers: 0","value":"th"},{"cost":"0.04","id":182,"servise":"Tango","serviseImg":"bg-xr","number":"Numbers: 27765","value":"xr"},{"cost":"0.00","id":183,"servise":"Global24","serviseImg":"bg-iz","number":"Numbers: 0","value":"iz"},{"cost":"0.03","id":184,"servise":"\u041c\u0412\u0438\u0434\u0435\u043e","serviseImg":"bg-tk","number":"Numbers: 27660","value":"tk"},{"cost":"0.00","id":185,"servise":"Sheerid","serviseImg":"bg-rx","number":"Numbers: 0","value":"rx"},{"cost":"0.00","id":186,"servise":"99app","serviseImg":"bg-ki","number":"Numbers: 0","value":"ki"},{"cost":"0.00","id":187,"servise":"CAIXA","serviseImg":"bg-my","number":"Numbers: 0","value":"my"},{"cost":"0.00","id":188,"servise":"OfferUp","serviseImg":"bg-zm","number":"Numbers: 0","value":"zm"},{"cost":"0.00","id":189,"servise":"Swvl","serviseImg":"bg-tq","number":"Numbers: 0","value":"tq"},{"cost":"0.00","id":190,"servise":"Haraj","serviseImg":"bg-au","number":"Numbers: 0","value":"au"},{"cost":"0.00","id":191,"servise":"Taksheel","serviseImg":"bg-ei","number":"Numbers: 0","value":"ei"},{"cost":"0.00","id":192,"servise":"hamrahaval","serviseImg":"bg-rp","number":"Numbers: 0","value":"rp"},{"cost":"0.00","id":193,"servise":"Gamekit","serviseImg":"bg-pa","number":"Numbers: 0","value":"pa"},{"cost":"0.00","id":194,"servise":" \u015eikayet var","serviseImg":"bg-fs","number":"Numbers: 0","value":"fs"},{"cost":"0.00","id":195,"servise":"Getir","serviseImg":"bg-ul","number":"Numbers: 0","value":"ul"},{"cost":"0.00","id":196,"servise":"irancell","serviseImg":"bg-cf","number":"Numbers: 0","value":"cf"},{"cost":"0.00","id":197,"servise":"Alfa","serviseImg":"bg-bt","number":"Numbers: 0","value":"bt"},{"cost":"0.00","id":198,"servise":"Disney Hotstar","serviseImg":"bg-ud","number":"Numbers: 0","value":"ud"},{"cost":"0.00","id":199,"servise":"Agroinform","serviseImg":"bg-qu","number":"Numbers: 0","value":"qu"},{"cost":"0.00","id":200,"servise":"humblebundle","serviseImg":"bg-un","number":"Numbers: 0","value":"un"},{"cost":"0.00","id":201,"servise":"Faberlic","serviseImg":"bg-rm","number":"Numbers: 0","value":"rm"},{"cost":"0.00","id":202,"servise":"CafeBazaar","serviseImg":"bg-uo","number":"Numbers: 0","value":"uo"},{"cost":"0.00","id":203,"servise":"cryptocom","serviseImg":"bg-ti","number":"Numbers: 0","value":"ti"},{"cost":"0.00","id":204,"servise":"Gittigidiyor","serviseImg":"bg-nk","number":"Numbers: 0","value":"nk"},{"cost":"0.00","id":205,"servise":"mzadqatar","serviseImg":"bg-jm","number":"Numbers: 0","value":"jm"},{"cost":"0.00","id":206,"servise":"Algida","serviseImg":"bg-lp","number":"Numbers: 0","value":"lp"},{"cost":"0.00","id":207,"servise":"Cita Previa","serviseImg":"bg-si","number":"Numbers: 0","value":"si"},{"cost":"0.00","id":208,"servise":"Potato Chat","serviseImg":"bg-fj","number":"Numbers: 0","value":"fj"},{"cost":"0.00","id":209,"servise":"Bitaqaty","serviseImg":"bg-pt","number":"Numbers: 0","value":"pt"},{"cost":"0.00","id":210,"servise":"Primaries 2020","serviseImg":"bg-qc","number":"Numbers: 0","value":"qc"},{"cost":"0.00","id":211,"servise":"Amasia","serviseImg":"bg-yo","number":"Numbers: 0","value":"yo"},{"cost":"0.00","id":212,"servise":"Dream11","serviseImg":"bg-ve","number":"Numbers: 0","value":"ve"},{"cost":"0.00","id":213,"servise":"Oriflame","serviseImg":"bg-qh","number":"Numbers: 0","value":"qh"},{"cost":"0.00","id":214,"servise":"Bykea","serviseImg":"bg-iu","number":"Numbers: 0","value":"iu"},{"cost":"0.00","id":215,"servise":"Immowelt","serviseImg":"bg-ib","number":"Numbers: 0","value":"ib"},{"cost":"0.00","id":216,"servise":"Digikala","serviseImg":"bg-zv","number":"Numbers: 0","value":"zv"},{"cost":"0.00","id":217,"servise":"Wing Money","serviseImg":"bg-jb","number":"Numbers: 0","value":"jb"},{"cost":"0.00","id":218,"servise":"Yaay","serviseImg":"bg-vn","number":"Numbers: 0","value":"vn"},{"cost":"0.00","id":219,"servise":"GameArena","serviseImg":"bg-wn","number":"Numbers: 0","value":"wn"},{"cost":"0.04","id":220,"servise":"Vita express","serviseImg":"bg-bj","number":"Numbers: 27861","value":"bj"},{"cost":"0.00","id":221,"servise":"Auchan","serviseImg":"bg-st","number":"Numbers: 0","value":"st"},{"cost":"0.00","id":222,"servise":"Picpay","serviseImg":"bg-ev","number":"Numbers: 0","value":"ev"},{"cost":"0.00","id":223,"servise":"Blued","serviseImg":"bg-qn","number":"Numbers: 0","value":"qn"},{"cost":"0.05","id":224,"servise":"Not on the list","serviseImg":"bg-ot","number":"Numbers: 19352","value":"ot"}]
for j in json_list:
n = i['number'].split()[-1]
print(n)
# do something interesting with n

Output not displaying full list of elements appended

from csv import reader
def func(sku_list):
values = []
with open(sku_list, 'r', encoding = 'utf-8') as pr:
rows = reader(pr)
for sku in rows:
values.append(sku[1])
return(values)
if __name__ == '__main__':
dir_path = "C:/Users/XXXX/Downloads/"
vendors = dir_path + 'file.csv'
new_prices = func(vendors)
print(new_prices)
sku_list is a csv file filled with pairs of brand names and their skus that I have downloaded from my db, for some reason as it iters through the rows and grabs just the sku value, hence sku[1], it stops well short of the actual length I expect the list to be
sku_list is 85,892 tuples long but when I print out the values appended to the list values it simply returns this:
['SKU', 'MWGB4896', 'MWGB4872', 'MWGB4848', 'MWGB3648', 'WGB4896', 'WGB4872', 'WGB4848', 'WGB3648', 'WGB2436', 'WGB1824', 'BKGB4896NT', 'BKGB4872NT', 'BKGB4848NT', 'BKGB3648NT', 'BKGB2436NT', 'BKGB1824NT', 'WFC2418G', 'WFC2418', 'WFC3624', 'WFC2418LB', 'WFC3648LB', 'WFC3624LB', 'WFC3624G', 'WFC3648G', 'WFC3648', 'LOWFC3624LB', 'LOWFC3624G', 'LOWFC3624', 'LOWFC2418LB', 'LOWFC2418G', 'LOWFC2418', 'LOWFC3648LB', 'LOWFC3648', 'LOWFC3648G', 'WM-7-B', 'WM-7-G', 'WM-7-BK', 'WMC-7', 'WM-7-R', 'APS-50', 'APS-70', 'APS-60', 'APS-84', 'SS15W', 'SC15W', 'SB15W', 'MFL-2W', 'WP-48', 'WP-40', 'WP-36', 'MP-48', 'MP-40', 'MP-36', 'OP-40', 'OP-36', 'OP-48', 'FFVSU96-2', 'FFVSU144-2', 'FFVSU192-2', '1-WA-1B', '1-WA-1BP', 'WCS-12', 'WCS-144', 'OPLD3416LSPP-2', 'OPLD3416LSPP-4', 'OPLD3416LSPP-5', 'OPLD3416LSPP-7', 'OPLD3416LSPP-8', 'OPLD1818LSPP-2', 'OPLD1818LSPP-4', 'OPLD1818LSPP-5', 'OPLD1818LSPP-7', 'OPLD1818LSPP-8', 'OPLD1818L-2', 'OPLD1818L-5', 'OPLD1818L-4', 'OPLD3416L-2', 'OPLD3416L-4', 'OPLD3416L-5', 'OPLD3416L-7', 'OPLD3416L-8', 'OPLD1818L-7', 'OPLD1818L-8', 'OPLD3416SPP-8-892', 'OPLD3416SPP-8-897', 'OPLD3416SPP-8-878', 'OPLD3416SPP-8-885', 'OPLD3416SPP-8-887', 'OPLD3416SPP-8-890', 'OPLD3416SPP-8-845', 'OPLD3416SPP-8-854', 'OPLD3416SPP-8-856', 'OPLD3416SPP-8-876', 'OPLD3416SPP-8-802', 'OPLD3416SPP-8-706', 'OPLD3416SPP-8-705', 'OPLD3416SPP-8-704', 'OPLD3416SPP-8-837', 'OPLD3416SPP-8-831', 'OPLD3416SPP-8-819', 'OPLD3416SPP-8-812', 'OPLD3416SPP-8-685', 'OPLD3416SPP-8-683', 'OPLD3416SPP-8-679', 'OPLD3416SPP-8-531', 'OPLD3416SPP-8-703', 'OPLD3416SPP-8-702', 'OPLD3416SPP-8-701', 'OPLD3416SPP-8-700', 'OPLD3416SPP-7-892', 'OPLD3416SPP-7-897', 'OPLD3416SPP-7-887', 'OPLD3416SPP-7-890', 'OPLD3416SPP-8-530', 'OPLD3416SPP-7-845', 'OPLD3416SPP-7-854', 'OPLD3416SPP-7-831', 'OPLD3416SPP-7-837', 'OPLD3416SPP-7-878', 'OPLD3416SPP-7-885', 'OPLD3416SPP-7-856', 'OPLD3416SPP-7-876', 'OPLD3416SPP-7-703', 'OPLD3416SPP-7-702', 'OPLD3416SPP-7-705', 'OPLD3416SPP-7-704', 'OPLD3416SPP-7-802', 'OPLD3416SPP-7-706', 'OPLD3416SPP-7-819', 'OPLD3416SPP-7-812', 'OPLD3416SPP-7-530', 'OPLD3416SPP-7-679', 'OPLD3416SPP-7-531', 'OPLD3416SPP-7-685', 'OPLD3416SPP-7-683', 'OPLD3416SPP-7-701', 'OPLD3416SPP-7-700', 'OPLD3416SPP-5-878', 'OPLD3416SPP-5-885', 'OPLD3416SPP-5-887', 'OPLD3416SPP-5-890', 'OPLD3416SPP-5-892', 'OPLD3416SPP-5-897', 'OPLD3416SPP-5-812', 'OPLD3416SPP-5-819', 'OPLD3416SPP-5-831', 'OPLD3416SPP-5-837', 'OPLD3416SPP-5-845', 'OPLD3416SPP-5-854', 'OPLD3416SPP-5-856', 'OPLD3416SPP-5-876', 'OPLD1818SPP-8-819', 'OPLD1818SPP-8-831', 'OPLD1818SPP-8-802', 'OPLD1818SPP-8-812', 'OPLD1818SPP-8-854', 'OPLD1818SPP-8-856', 'OPLD1818SPP-8-837', 'OPLD1818SPP-8-845', 'OPLD1818SPP-8-701', 'OPLD1818SPP-8-702', 'OPLD1818SPP-8-685', 'OPLD1818SPP-8-700', 'OPLD1818SPP-8-705', 'OPLD1818SPP-8-706', 'OPLD1818SPP-8-703', 'OPLD1818SPP-8-704', 'OPLD1818SPP-8-887', 'OPLD1818SPP-8-885', 'OPLD1818SPP-8-878', 'OPLD1818SPP-8-876', 'OPLD1818SPP-8-897', 'OPLD1818SPP-8-892', 'OPLD1818SPP-8-890', 'OPLD3416SPP-4-837', 'OPLD3416SPP-4-831', 'OPLD3416SPP-4-854', 'OPLD3416SPP-4-845', 'OPLD3416SPP-4-802', 'OPLD3416SPP-4-706',
'OPLD3416SPP-4-819', 'OPLD3416SPP-4-812', 'OPLD3416SPP-4-890', 'OPLD3416SPP-4-887', 'OPLD3416SPP-4-897', 'OPLD3416SPP-4-892', 'OPLD3416SPP-4-876', 'OPLD3416SPP-4-856', 'OPLD3416SPP-4-885', 'OPLD3416SPP-4-878', 'OPLD3416SPP-5-531', 'OPLD3416SPP-5-679', 'OPLD3416SPP-5-683', 'OPLD3416SPP-5-685', 'OPLD3416SPP-5-530', 'OPLD3416SPP-5-704', 'OPLD3416SPP-5-705', 'OPLD3416SPP-5-706', 'OPLD3416SPP-5-802', 'OPLD3416SPP-5-700', 'OPLD3416SPP-5-701', 'OPLD3416SPP-5-702', 'OPLD3416SPP-5-703', 'OPLD3416SPP-2-837', 'OPLD3416SPP-2-831', 'OPLD3416SPP-2-819', 'OPLD3416SPP-2-812', 'OPLD3416SPP-2-802', 'OPLD3416SPP-2-706', 'OPLD3416SPP-2-705', 'OPLD3416SPP-2-704', 'OPLD3416SPP-2-890', 'OPLD3416SPP-2-887', 'OPLD3416SPP-2-885', 'OPLD3416SPP-2-878', 'OPLD3416SPP-2-876', 'OPLD3416SPP-2-856', 'OPLD3416SPP-2-854', 'OPLD3416SPP-2-845', 'OPLD3416SPP-4-531', 'OPLD3416SPP-4-679', 'OPLD3416SPP-4-530', 'OPLD3416SPP-2-892', 'OPLD3416SPP-2-897', 'OPLD3416SPP-4-704', 'OPLD3416SPP-4-705', 'OPLD3416SPP-4-702', 'OPLD3416SPP-4-703', 'OPLD3416SPP-4-700', 'OPLD3416SPP-4-701', 'OPLD3416SPP-4-683', 'OPLD3416SPP-4-685', 'OPLD3416SPP-2-530', 'OPLD3416SPP-2-531', 'OPLD3416SPP-2-679', 'OPLD3416SPP-2-683', 'OPLD3416SPP-2-685', 'OPLD3416SPP-2-700', 'OPLD3416SPP-2-701', 'OPLD3416SPP-2-702', 'OPLD3416SPP-2-703', 'OPLD1818SPP-7-819', 'OPLD1818SPP-7-831', 'OPLD1818SPP-7-837', 'OPLD1818SPP-7-845', 'OPLD1818SPP-7-705', 'OPLD1818SPP-7-706', 'OPLD1818SPP-7-802', 'OPLD1818SPP-7-812', 'OPLD1818SPP-7-701', 'OPLD1818SPP-7-702', 'OPLD1818SPP-7-703', 'OPLD1818SPP-7-704', 'OPLD1818SPP-7-679', 'OPLD1818SPP-7-683', 'OPLD1818SPP-7-685', 'OPLD1818SPP-7-700', 'OPLD1818SPP-8-531', 'OPLD1818SPP-8-530', 'OPLD1818SPP-8-683', 'OPLD1818SPP-8-679', 'OPLD1818SPP-7-897', 'OPLD1818SPP-7-887', 'OPLD1818SPP-7-885', 'OPLD1818SPP-7-892', 'OPLD1818SPP-7-890', 'OPLD1818SPP-7-856', 'OPLD1818SPP-7-854', 'OPLD1818SPP-7-878', 'OPLD1818SPP-7-876', 'OPLD1818SPP-5-819', 'OPLD1818SPP-5-831', 'OPLD1818SPP-5-802', 'OPLD1818SPP-5-812', 'OPLD1818SPP-5-705', 'OPLD1818SPP-5-706', 'OPLD1818SPP-5-703', 'OPLD1818SPP-5-704', 'OPLD1818SPP-5-701', 'OPLD1818SPP-5-702', 'OPLD1818SPP-5-685', 'OPLD1818SPP-5-700', 'OPLD1818SPP-5-679', 'OPLD1818SPP-5-683', 'OPLD1818SPP-5-530', 'OPLD1818SPP-5-531', 'OPLD1818SPP-7-531', 'OPLD1818SPP-7-530', 'OPLD1818SPP-5-897', 'OPLD1818SPP-5-892', 'OPLD1818SPP-5-890', 'OPLD1818SPP-5-887', 'OPLD1818SPP-5-885', 'OPLD1818SPP-5-878', 'OPLD1818SPP-5-876', 'OPLD1818SPP-5-856', 'OPLD1818SPP-5-854', 'OPLD1818SPP-5-845', 'OPLD1818SPP-5-837', 'OPLD1818SPP-4-701', 'OPLD1818SPP-4-702', 'OPLD1818SPP-4-703', 'OPLD1818SPP-4-704', 'OPLD1818SPP-4-705', 'OPLD1818SPP-4-706', 'OPLD1818SPP-4-802', 'OPLD1818SPP-4-812', 'OPLD1818SPP-4-530', 'OPLD1818SPP-4-531', 'OPLD1818SPP-4-679', 'OPLD1818SPP-4-683', 'OPLD1818SPP-4-685', 'OPLD1818SPP-4-700', 'OPLD1818SPP-4-887', 'OPLD1818SPP-2-837', 'OPLD1818SPP-2-845', 'OPLD1818SPP-2-854', 'OPLD1818SPP-2-856', 'OPLD1818SPP-2-802', 'OPLD1818SPP-2-812', 'OPLD1818SPP-2-819', 'OPLD1818SPP-2-831', 'OPLD1818SPP-2-890', 'OPLD1818SPP-2-892', 'OPLD1818SPP-2-897', 'OPLD1818SPP-2-876', 'OPLD1818SPP-2-878', 'OPLD1818SPP-2-885', 'OPLD1818SPP-2-887', 'OPLD1818SPP-2-531', 'OPLD1818SPP-2-530', 'OPLD1818SPP-2-683', 'OPLD1818SPP-2-679', 'OPLD1818SPP-2-704', 'OPLD1818SPP-2-703',
'OPLD1818SPP-2-706', 'OPLD1818SPP-2-705', 'OPLD1818SPP-2-700', 'OPLD1818SPP-2-685', 'OPLD1818SPP-2-702', 'OPLD1818SPP-2-701', 'OPLD1818SPP-4-876', 'OPLD1818SPP-4-878', 'OPLD1818SPP-4-854', 'OPLD1818SPP-4-856', 'OPLD1818SPP-4-837', 'OPLD1818SPP-4-845', 'OPLD1818SPP-4-819', 'OPLD1818SPP-4-831', 'OPLD1818SPP-4-897', 'OPLD1818SPP-4-890', 'OPLD1818SPP-4-892', 'OPLD1818SPP-4-885', 'PLD4832DPP-2-845', 'PLD4832DPP-2-837', 'PLD4832DPP-2-856', 'PLD4832DPP-2-854', 'PLD4832DPP-2-878', 'PLD4832DPP-2-876', 'PLD4832DPP-2-887', 'PLD4832DPP-2-885', 'PLD4832DPP-2-892', 'PLD4832DPP-2-890', 'PLD4832DPP-2-897', 'PLD4832DPP-4-531', 'PLD4832DPP-4-530', 'PLD4832DPP-4-679', 'PLD4832DPP-4-683', 'PLD4832DPP-4-685', 'PLD4832DPP-4-700', 'PLD4832DPP-4-701', 'PLD4832DPP-4-702', 'PLD4832DPP-4-703', 'PLD4832DPP-4-704', 'PLD4832DPP-4-705', 'PLD4832DPP-4-706', 'PLD4832DPP-4-802', 'PLD4832DPP-4-812', 'PLD4832DPP-4-819', 'PLD4832DPP-4-831', 'PLD4832DPP-4-837', 'PLD4832DPP-4-845', 'PLD4832DPP-4-878', 'PLD4832DPP-4-876', 'PLD4832DPP-4-856', 'PLD4832DPP-4-854', 'PLD4832DPP-4-892', 'PLD4832DPP-4-890', 'PLD4832DPP-4-887', 'PLD4832DPP-4-885', 'PLD4832DPP-4-897', 'PLD4832DPP-5-683', 'PLD4832DPP-5-679', 'PLD4832DPP-5-531', 'PLD4832DPP-5-530', 'PLD4832DPP-5-701', 'PLD4832DPP-5-702', 'PLD4832DPP-5-685', 'PLD4832DPP-5-700', 'PLD4832DPP-5-705', 'PLD4832DPP-5-706', 'PLD4832DPP-5-703', 'PLD4832DPP-5-704', 'PLD4832DPP-5-819', 'PLD4832DPP-5-831', 'PLD4832DPP-5-802', 'PLD4832DPP-5-812', 'PLD4832DPP-5-854', 'PLD4832DPP-5-856', 'PLD4832DPP-5-837', 'PLD4832DPP-5-845', 'PLD4832DPP-2-701', 'PLD4832DPP-2-702', 'PLD4832DPP-2-685', 'PLD4832DPP-2-700', 'PLD4832DPP-2-679', 'PLD4832DPP-2-683', 'PLD4832DPP-2-530', 'PLD4832DPP-2-531', 'PLD4832DPP-2-819', 'PLD4832DPP-2-831', 'PLD4832DPP-2-802', 'PLD4832DPP-2-812', 'PLD4832DPP-2-705', 'PLD4832DPP-2-706', 'PLD4832DPP-2-703', 'PLD4832DPP-2-704', 'PLD4226DPP-8-887', 'PLD4226DPP-8-890', 'PLD4226DPP-8-892', 'PLD4226DPP-8-897', 'PLD4226DPP-8-856', 'PLD4226DPP-8-876', 'PLD4226DPP-8-878', 'PLD4226DPP-8-885', 'PLD4226DPP-8-831', 'PLD4226DPP-8-837', 'PLD4226DPP-8-845', 'PLD4226DPP-8-854', 'PLD4226DPP-8-706', 'PLD4226DPP-8-802', 'PLD4226DPP-8-812', 'PLD4226DPP-8-819', 'PLD4226DPP-5-892', 'PLD4226DPP-5-897', 'PLD4226DPP-5-887', 'PLD4226DPP-5-890', 'PLD4226DPP-7-530', 'PLD4226DPP-7-683', 'PLD4226DPP-7-685', 'PLD4226DPP-7-531', 'PLD4226DPP-7-679', 'PLD4226DPP-7-702', 'PLD4226DPP-7-703', 'PLD4226DPP-7-700', 'PLD4226DPP-7-701', 'PLD4226DPP-5-705', 'PLD4226DPP-5-704', 'PLD4226DPP-5-703', 'PLD4226DPP-5-702', 'PLD4226DPP-5-819', 'PLD4226DPP-5-812', 'PLD4226DPP-5-802', 'PLD4226DPP-5-706', 'PLD4226DPP-5-854', 'PLD4226DPP-5-845', 'PLD4226DPP-5-837', 'PLD4226DPP-5-831', 'PLD4226DPP-5-885', 'PLD4226DPP-5-878', 'PLD4226DPP-5-876', 'PLD4226DPP-5-856', 'PLD4226DPP-7-892', 'PLD4226DPP-7-897', 'PLD4226DPP-8-530', 'PLD4226DPP-8-531', 'PLD4226DPP-8-679', 'PLD4226DPP-8-683', 'PLD4226DPP-8-685', 'PLD4226DPP-8-700', 'PLD4226DPP-8-701', 'PLD4226DPP-8-702', 'PLD4226DPP-8-703', 'PLD4226DPP-8-704', 'PLD4226DPP-8-705', 'PLD4226DPP-7-705', 'PLD4226DPP-7-704', 'PLD4226DPP-7-802', 'PLD4226DPP-7-706', 'PLD4226DPP-7-819', 'PLD4226DPP-7-812', 'PLD4226DPP-7-837', 'PLD4226DPP-7-831', 'PLD4226DPP-7-854', 'PLD4226DPP-7-845', 'PLD4226DPP-7-876', 'PLD4226DPP-7-856', 'PLD4226DPP-7-885', 'PLD4226DPP-7-878', 'PLD4226DPP-7-890', 'PLD4226DPP-7-887', 'PLD4226DPP-2-892', 'PLD4226DPP-2-897', 'PLD4226DPP-2-887', 'PLD4226DPP-2-890', 'PLD4226DPP-2-878', 'PLD4226DPP-2-885', 'PLD4226DPP-2-856', 'PLD4226DPP-2-876', 'PLD4226DPP-4-683', 'PLD4226DPP-4-685', 'PLD4226DPP-4-531', 'PLD4226DPP-4-679', 'PLD4226DPP-4-530', 'PLD4226DPP-2-705', 'PLD4226DPP-2-704', 'PLD4226DPP-2-703', 'PLD4226DPP-2-702', 'PLD4226DPP-2-701', 'PLD4226DPP-2-700', 'PLD4226DPP-2-685', 'PLD4226DPP-2-683', 'PLD4226DPP-2-854', 'PLD4226DPP-2-845', 'PLD4226DPP-2-837', 'PLD4226DPP-2-831', 'PLD4226DPP-2-819', 'PLD4226DPP-2-812', 'PLD4226DPP-2-802', 'PLD4226DPP-2-706', 'PLD4226DPP-4-892', 'PLD4226DPP-4-897', 'PLD4226DPP-4-878', 'PLD4226DPP-4-885', 'PLD4226DPP-4-887', 'PLD4226DPP-4-890', 'PLD4226DPP-5-683', 'PLD4226DPP-5-685', 'PLD4226DPP-5-700', 'PLD4226DPP-5-701', 'PLD4226DPP-5-530', 'PLD4226DPP-5-531', 'PLD4226DPP-5-679', 'PLD4226DPP-4-705', 'PLD4226DPP-4-704', 'PLD4226DPP-4-802', 'PLD4226DPP-4-706', 'PLD4226DPP-4-701', 'PLD4226DPP-4-700', 'PLD4226DPP-4-703', 'PLD4226DPP-4-702', 'PLD4226DPP-4-854', 'PLD4226DPP-4-845', 'PLD4226DPP-4-876', 'PLD4226DPP-4-856', 'PLD4226DPP-4-819', 'PLD4226DPP-4-812', 'PLD4226DPP-4-837', 'PLD4226DPP-4-831', 'PLD4226DPP-2-530', 'PLD4226DPP-2-679', 'PLD4226DPP-2-531', 'PLD5438DPP-5-683', 'PLD5438DPP-5-685', 'PLD5438DPP-5-531', 'PLD5438DPP-5-679', 'PLD5438DPP-5-702', 'PLD5438DPP-5-703', 'PLD5438DPP-5-700', 'PLD5438DPP-5-701', 'PLD5438DPP-5-706', 'PLD5438DPP-5-802', 'PLD5438DPP-5-704', 'PLD5438DPP-5-705', 'PLD5438DPP-5-831', 'PLD5438DPP-5-837', 'PLD5438DPP-5-812', 'PLD5438DPP-5-819', 'PLD5438DPP-5-876', 'PLD5438DPP-5-856', 'PLD5438DPP-5-854', 'PLD5438DPP-5-845', 'PLD5438DPP-5-890', 'PLD5438DPP-5-887', 'PLD5438DPP-5-885', 'PLD5438DPP-5-878', 'PLD5438DPP-5-897', 'PLD5438DPP-5-892', 'PLD5438DPP-7-679', 'PLD5438DPP-7-531', 'PLD5438DPP-7-530', 'PLD5438DPP-4-530', 'PLD5438DPP-4-531', 'PLD5438DPP-4-679', 'PLD5438DPP-4-683', 'PLD5438DPP-4-685', 'PLD5438DPP-4-700', 'PLD5438DPP-4-701', 'PLD5438DPP-4-702', 'PLD5438DPP-4-703', 'PLD5438DPP-4-704', 'PLD5438DPP-4-705', 'PLD5438DPP-4-706', 'PLD5438DPP-4-802', 'PLD5438DPP-4-812', 'PLD5438DPP-4-819', 'PLD5438DPP-4-837', 'PLD5438DPP-4-831', 'PLD5438DPP-4-854', 'PLD5438DPP-4-845', 'PLD5438DPP-4-876', 'PLD5438DPP-4-856', 'PLD5438DPP-4-885', 'PLD5438DPP-4-878', 'PLD5438DPP-4-890', 'PLD5438DPP-4-887', 'PLD5438DPP-4-897', 'PLD5438DPP-4-892', 'PLD5438DPP-5-530',
'PLD5438DPP
None
the final sku in there PLD5438DPP should be PLD5438DPP-5-683 and for some reason the list cuts off there, which is only element 564/85,892, and the program terminates without an error code
I cannot attach the file of skus, this is for my job, just hoping someone can shed light on what I am doing to cause the list to cut short like that
this may or may not also be relevant but when I call .append(sku) as opposed to sku[1] and grab the whole tuple the same issue occurs but at element 292, exactly half of the amount of element appended when only doing half the tuple
The issue seems to be one on my local machine, where it was unable to print such a long list, this one was of size 85,892
for those with similar issues see if any of our specs are overlapping and that may determine the cause of this issue:
VSCode:
Version: 1.52.0 (user setup)
Commit: 940b5f4bb5fa47866a54529ed759d95d09ee80be
Date: 2020-12-10T22:45:11.850Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363
Python:
3.9.0
see discussion in comments for other details

print word vectors simply instead of obtaining them as array

A very simple task but I don't seem to do it. I want to obtain my vectors like this:
the -0.038194 -0.24487 0.72812 -0.39961 0.083172 0.043953 -0.39141 0.3344 -0.57545 0.087459 0.28787 -0.06731 0.30906 -0.26384 -0.13231 -0.20757 0.33395 -0.33848 -0.31743 -0.48336 0.1464 -0.37304 0.34577 0.052041 0.44946 -0.46971 0.02628 -0.54155 -0.15518 -0.14107 -0.039722 0.28277 0.14393 0.23464 -0.31021 0.086173 0.20397 0.52624 0.17164 -0.082378 -0.71787 -0.41531 0.20335 -0.12763 0.41367 0.55187 0.57908 -0.33477 -0.36559 -0.54857 -0.062892 0.26584 0.30205 0.99775 -0.80481 -3.0243 0.01254 -0.36942 2.2167 0.72201 -0.24978 0.92136 0.034514 0.46745 1.1079 -0.19358 -0.074575 0.23353 -0.052062 -0.22044 0.057162 -0.15806 -0.30798 -0.41625 0.37972 0.15006 -0.53212 -0.2055 -1.2526 0.071624 0.70565 0.49744 -0.42063 0.26148 -1.538 -0.30223 -0.073438 -0.28312 0.37104 -0.25217 0.016215 -0.017099 -0.38984 0.87424 -0.72569 -0.51058 -0.52028 -0.1459 0.8278 0.27062
, -0.10767 0.11053 0.59812 -0.54361 0.67396 0.10663 0.038867 0.35481 0.06351 -0.094189 0.15786 -0.81665 0.14172 0.21939 0.58505 -0.52158 0.22783 -0.16642 -0.68228 0.3587 0.42568 0.19021 0.91963 0.57555 0.46185 0.42363 -0.095399 -0.42749 -0.16567 -0.056842 -0.29595 0.26037 -0.26606 -0.070404 -0.27662 0.15821 0.69825 0.43081 0.27952 -0.45437 -0.33801 -0.58184 0.22364 -0.5778 -0.26862 -0.20425 0.56394 -0.58524 -0.14365 -0.64218 0.0054697 -0.35248 0.16162 1.1796 -0.47674 -2.7553 -0.1321 -0.047729 1.0655 1.1034 -0.2208 0.18669 0.13177 0.15117 0.7131 -0.35215 0.91348 0.61783 0.70992 0.23955 -0.14571 -0.37859 -0.045959 -0.47368 0.2385 0.20536 -0.18996 0.32507 -1.1112 -0.36341 0.98679 -0.084776 -0.54008 0.11726 -1.0194 -0.24424 0.12771 0.013884 0.080374 -0.35414 0.34951 -0.7226 0.37549 0.4441 -0.99059 0.61214 -0.35111 -0.83155 0.45293 0.082577
. -0.33979 0.20941 0.46348 -0.64792 -0.38377 0.038034 0.17127 0.15978 0.46619 -0.019169 0.41479 -0.34349 0.26872 0.04464 0.42131 -0.41032 0.15459 0.022239 -0.64653 0.25256 0.043136 -0.19445 0.46516 0.45651 0.68588 0.091295 0.21875 -0.70351 0.16785 -0.35079 -0.12634 0.66384 -0.2582 0.036542 -0.13605 0.40253 0.14289 0.38132 -0.12283 -0.45886 -0.25282 -0.30432 -0.11215 -0.26182 -0.22482 -0.44554 0.2991 -0.85612 -0.14503 -0.49086 0.0082973 -0.17491 0.27524 1.4401 -0.21239 -2.8435 -0.27958 -0.45722 1.6386 0.78808 -0.55262 0.65 0.086426 0.39012 1.0632 -0.35379 0.48328 0.346 0.84174 0.098707 -0.24213 -0.27053 0.045287 -0.40147 0.11395 0.0062226 0.036673 0.018518 -1.0213 -0.20806 0.64072 -0.068763 -0.58635 0.33476 -1.1432 -0.1148 -0.25091 -0.45907 -0.096819 -0.17946 -0.063351 -0.67412 -0.068895 0.53604 -0.87773 0.31802 -0.39242 -0.23394 0.47298 -0.028803
of -0.1529 -0.24279 0.89837 0.16996 0.53516 0.48784 -0.58826 -0.17982 -1.3581 0.42541 0.15377 0.24215 0.13474 0.41193 0.67043 -0.56418 0.42985 -0.012183 -0.11677 0.31781 0.054177 -0.054273 0.35516 -0.30241 0.31434 -0.33846 0.71715 -0.26855 -0.15837 -0.47467 0.051581 -0.33252 0.15003 -0.1299 -0.54617 -0.37843 0.64261 0.82187 -0.080006 0.078479 -0.96976 -0.57741 0.56491 -0.39873 -0.057099 0.19743 0.065706 -0.48092 -0.20125 -0.40834 0.39456 -0.02642 -0.11838 1.012 -0.53171 -2.7474 -0.042981 -0.74849 1.7574 0.59085 0.04885 0.78267 0.38497 0.42097 0.67882 0.10337 0.6328 -0.026595 0.58647 -0.44332 0.33057 -0.12022 -0.55645 0.073611 0.20915 0.43395 -0.012761 0.089874 -1.7991 0.084808 0.77112 0.63105 -0.90685 0.60326 -1.7515 0.18596 -0.50687 -0.70203 0.66578 -0.81304 0.18712 -0.018488 -0.26757 0.727 -0.59363 -0.34839 -0.56094 -0.591 1.0039 0.20664
to -0.1897 0.050024 0.19084 -0.049184 -0.089737 0.21006 -0.54952 0.098377 -0.20135 0.34241 -0.092677 0.161 -0.13268 -0.2816 0.18737 -0.42959 0.96039 0.13972 -1.0781 0.40518 0.50539 -0.55064 0.4844 0.38044 -0.0029055 -0.34942 -0.099696 -0.78368 1.0363 -0.2314 -0.47121 0.57126 -0.21454 0.35958 -0.48319 1.0875 0.28524 0.12447 -0.039248 -0.076732 -0.76343 -0.32409 -0.5749 -1.0893 -0.41811 0.4512 0.12112 -0.51367 -0.13349 -1.1378 -0.28768 0.16774 0.55804 1.5387 0.018859 -2.9721 -0.24216 -0.92495 2.1992 0.28234 -0.3478 0.51621 -0.43387 0.36852 0.74573 0.072102 0.27931 0.92569 -0.050336 -0.85856 -0.1358 -0.92551 -0.33991 -1.0394 -0.067203 -0.21379 -0.4769 0.21377 -0.84008 0.052536 0.59298 0.29604 -0.67644 0.13916 -1.5504 -0.20765 0.7222 0.52056 -0.076221 -0.15194 -0.13134 0.058617 -0.31869 -0.61419 -0.62393 -0.41548 -0.038175 -0.39804 0.47647 -0.15983
and -0.071953 0.23127 0.023731 -0.50638 0.33923 0.1959 -0.32943 0.18364 -0.18057 0.28963 0.20448 -0.5496 0.27399 0.58327 0.20468 -0.49228 0.19974 -0.070237 -0.88049 0.29485 0.14071 -0.1009 0.99449 0.36973 0.44554 0.28998 -0.1376 -0.56365 -0.029365 -0.4122 -0.25269 0.63181 -0.44767 0.24363 -0.10813 0.25164 0.46967 0.3755 -0.23613 -0.14129 -0.44537 -0.65737 -0.042421 -0.28636 -0.28811 0.063766 0.20281 -0.53542 0.41307 -0.59722 -0.38614 0.19389 -0.17809 1.6618 -0.011819 -2.3737 0.058427 -0.2698 1.2823 0.81925 -0.22322 0.72932 -0.053211 0.43507 0.85011 -0.42935 0.92664 0.39051 1.0585 -0.24561 -0.18265 -0.5328 0.059518 -0.66019 0.18991 0.28836 -0.2434 0.52784 -0.65762 -0.14081 1.0491 0.5134 -0.23816 0.69895 -1.4813 -0.2487 -0.17936 -0.059137 -0.08056 -0.48782 0.014487 -0.6259 -0.32367 0.41862 -1.0807 0.46742 -0.49931 -0.71895 0.86894 0.19539
in 0.085703 -0.22201 0.16569 0.13373 0.38239 0.35401 0.01287 0.22461 -0.43817 0.50164 -0.35874 -0.34983 0.055156 0.69648 -0.17958 0.067926 0.39101 0.16039 -0.26635 -0.21138 0.53698 0.49379 0.9366 0.66902 0.21793 -0.46642 0.22383 -0.36204 -0.17656 0.1748 -0.20367 0.13931 0.019832 -0.10413 -0.20244 0.55003 -0.1546 0.98655 -0.26863 -0.2909 -0.32866 -0.34188 -0.16943 -0.42001 -0.046727 -0.16327 0.70824 -0.74911 -0.091559 -0.96178 -0.19747 0.10282 0.55221 1.3816 -0.65636 -3.2502 -0.31556 -1.2055 1.7709 0.4026 -0.79827 1.1597 -0.33042 0.31382 0.77386 0.22595 0.52471 -0.034053 0.32048 0.079948 0.17752 -0.49426 -0.70045 -0.44569 0.17244 0.20278 0.023292 -0.20677 -1.0158 0.18325 0.56752 0.31821 -0.65011 0.68277 -0.86585 -0.059392 -0.29264 -0.55668 -0.34705 -0.32895 0.40215 -0.12746 -0.20228 0.87368 -0.545 0.79205 -0.20695 -0.074273 0.75808 -0.34243
a -0.27086 0.044006 -0.02026 -0.17395 0.6444 0.71213 0.3551 0.47138 -0.29637 0.54427 -0.72294 -0.0047612 0.040611 0.043236 0.29729 0.10725 0.40156 -0.53662 0.033382 0.067396 0.64556 -0.085523 0.14103 0.094539 0.74947 -0.194 -0.68739 -0.41741 -0.22807 0.12 -0.48999 0.80945 0.045138 -0.11898 0.20161 0.39276 -0.20121 0.31354 0.75304 0.25907 -0.11566 -0.029319 0.93499 -0.36067 0.5242 0.23706 0.52715 0.22869 -0.51958 -0.79349 -0.20368 -0.50187 0.18748 0.94282 -0.44834 -3.6792 0.044183 -0.26751 2.1997 0.241 -0.033425 0.69553 -0.64472 -0.0072277 0.89575 0.20015 0.46493 0.61933 -0.1066 0.08691 -0.4623 0.18262 -0.15849 0.020791 0.19373 0.063426 -0.31673 -0.48177 -1.3848 0.13669 0.96859 0.049965 -0.2738 -0.035686 -1.0577 -0.24467 0.90366 -0.12442 0.080776 -0.83401 0.57201 0.088945 -0.42532 -0.018253 -0.079995 -0.28581 -0.01089 -0.4923 0.63687 0.23642
" -0.30457 -0.23645 0.17576 -0.72854 -0.28343 -0.2564 0.26587 0.025309 -0.074775 -0.3766 -0.057774 0.12159 0.34384 0.41928 -0.23236 -0.31547 0.60939 0.25117 -0.68667 0.70873 1.2162 -0.1824 -0.48442 -0.33445 0.30343 1.086 0.49992 -0.20198 0.27959 0.68352 -0.33566 -0.12405 0.059656 0.33617 0.37501 0.56552 0.44867 0.11284 -0.16196 -0.94346 -0.67961 0.18581 0.060653 0.43776 0.13834 -0.48207 -0.56141 -0.25422 -0.52445 0.097003 -0.48925 0.19077 0.21481 1.4969 -0.86665 -3.2846 0.56854 0.41971 1.2294 0.78522 -0.29369 0.63803 -1.5926 -0.20437 1.5306 0.13548 0.50722 0.18742 0.48552 -0.28995 0.19573 0.0046515 0.092879 -0.42444 0.64987 0.52839 0.077908 0.8263 -1.2208 -0.34955 0.49855 -0.64155 -0.72308 0.26566 -1.3643 -0.46364 -0.52048 -1.0525 0.22895 -0.3456 -0.658 -0.16735 0.35158 0.74337 0.26074 0.061104 -0.39079 -0.84557 -0.035432 0.17036
's 0.58854 -0.2025 0.73479 -0.68338 -0.19675 -0.1802 -0.39177 0.34172 -0.60561 0.63816 -0.26695 0.36486 -0.40379 -0.1134 -0.58718 0.2838 0.8025 -0.35303 0.30083 0.078935 0.44416 -0.45906 0.79294 0.50365 0.32805 0.28027 -0.4933 -0.38482 -0.039284 -0.2483 -0.1988 1.1469 0.13228 0.91691 -0.36739 0.89425 0.5426 0.61738 -0.62205 -0.31132 -0.50933 0.23335 1.0826 -0.044637 -0.12767 0.27628 -0.032617 -0.27397 0.77764 -0.50861 0.038307 -0.33679 0.42344 1.2271 -0.53826 -3.2411 0.42626 0.025189 1.3948 0.65085 0.03325 0.37141 0.4044 0.35558 0.98265 -0.61724 0.53901 0.76219 0.30689 0.33065 0.30956 -0.15161 -0.11313 -0.81281 0.6145 -0.44341 -0.19163 -0.089551 -1.5927 0.37405 0.85857 0.54613 -0.31928 0.52598 -1.4802 -0.97931 -0.2939 -0.14724 0.25803 -0.1817 1.0149 0.77649 0.12598 0.54779 -1.0316 0.064599 -0.37523 -0.94475 0.61802 0.39591
for -0.14401 0.32554 0.14257 -0.099227 0.72536 0.19321 -0.24188 0.20223 -0.89599 0.15215 0.035963 -0.59513 -0.051635 -0.014428 0.35475 -0.31859 0.76984 -0.087369 -0.24762 0.65059 -0.15138 -0.42703 0.18813 0.091562 0.15192 0.11303 -0.15222 -0.62786 -0.23923 0.096009 -0.46147 0.41526 -0.30475 0.1371 0.16758 0.53301 -0.043658 0.85924 -0.41192 -0.21394 -0.51228 -0.31945 0.12662 -0.3151 0.0031429 0.27129 0.17328 -1.3159 -0.42414 -0.69126 0.019017 -0.13375 -0.096057 1.7069 -0.65291 -2.6111 0.26518 -0.61178 2.095 0.38148 -0.55823 0.2036 -0.33704 0.37354 0.6951 -0.001637 0.81885 0.51793 0.27746 -0.37177 -0.43345 -0.42732 -0.54912 -0.30715 0.18101 0.2709 -0.29266 0.30834 -1.4624 -0.18999 0.92277 -0.099217 -0.25165 0.49197 -1.525 0.15326 0.2827 0.12102 -0.36766 -0.61275 -0.18884 0.10907 0.12315 0.090066 -0.65447 -0.17252 2.6336e-05 0.25398 1.1078 -0.073074
Here's the full link for the text file so u can see the format completely: https://www.kaggle.com/terenceliu4444/glove6b100dtxt
And Here's my code:
with codecs.open('data/{}.tsv'.format(lcode), 'w', 'utf-8') as fout:
for i, word in enumerate(model.index2word):
fout.write(u"{}\t{}\t{}\n".format(str(i), word.encode('utf8').decode('utf8'),
np.array_str(model[word])
))
and my output is like this:
the [ 0.28177965 -1.3835016 -0.85463244 0.5744817 -0.42041674 0.4850773
-0.18238722 0.9088641 1.6516979 -0.24690722 0.5303408 -0.8106607
0.27385864 0.6186187 -2.061754 1.2491482 0.44255176 -0.25498274
-0.11942661 -0.1751283 0.2187617 -1.2942451 -0.79252934 1.8655167
-1.4975996 -0.02266688 0.26935738 -0.36034968 -1.5055205 0.0860498
1.0129709 1.1270534 -1.3774556 -0.02182451 -0.52671534 -0.7581365
-0.16326018 -0.2763609 0.5690212 -1.355627 0.43560007 2.4623177
-0.46482357 0.85816354 -0.5735287 -0.99033487 0.646639 -0.18928614
-0.6105273 -0.94887084 -0.39465773 0.38946334 -0.5338978 -0.0211645
-0.06462063 1.1689087 -0.88438195 -0.60245454 1.0320075 0.75902534
-1.9108475 -0.8921491 0.57644296 1.8618042 -0.5125161 -1.4219466
0.45342374 0.25558227 1.0577608 0.48511812 0.76758397 -1.0726306
1.5792096 0.01924564 1.8321682 -0.4707404 -0.41836467 0.07758982
0.50893927 -0.71105474 -0.33766833 1.4899743 0.60877067 -0.09521568
0.6654671 -0.0286361 -0.17863822 0.8811929 -1.330545 -1.104361
0.51000476 0.2639544 1.2233694 -0.10699744 -1.1367066 0.6225027
0.5847332 -0.03609625 2.3312287 0.1025821 ]
a [ 1.0829129 0.84877855 -1.1785074 0.13858096 2.008711 0.44480678
0.41152284 -0.9221507 1.5342509 0.8937895 -0.12867515 1.2286083
-1.6460084 0.96246207 0.11606621 -0.7079361 0.7204446 -2.17121
0.21708168 -1.029137 -0.53540015 0.40489924 -0.52271795 1.7237337
-1.3921518 -1.4322941 1.392808 0.7498414 -1.4813395 1.655896
1.0292306 -0.10302904 -0.09161732 0.9659639 0.13209064 -0.5149641
-0.11515223 -1.6309028 -1.1918032 0.34248984 0.6209429 1.0181456
-0.65688735 0.80660087 -0.6315423 -0.68773484 -0.44171524 -0.8294182
0.62340856 -1.0040073 0.40221572 -0.30175862 0.02053229 0.31205446
-0.16386059 0.18476132 0.18067418 -0.28932625 1.0893115 0.11680666
0.1104597 -0.30494598 -0.06541535 0.75524884 3.3038845 -0.5918715
1.0957772 -0.51271206 1.3486993 0.6190552 -1.365369 -2.9811475
1.3973937 1.4510086 0.45045042 0.61286205 1.7809817 -0.639005
-0.22986257 -1.4068168 0.34073976 0.38807136 -0.10908178 -0.9710727
-0.2207968 0.66323316 2.2619925 1.8806032 -0.06102083 0.86097974
-0.07785034 0.3742449 1.800688 -0.92509884 0.1773087 0.38380435
0.44551063 0.5976865 1.8766458 0.23904268]
I tried to remove array from my code and still couldn't print those word vectors in that format. Im using Genism by the way to obtain vectors.
That looks like roughly the format (minus one leading line) that's already written-out by the .save_word2vec_format() method on gensim word-vector classes.
You should try using that, perhaps with the write_first_line parameter as False, or simply editing the file afterwards. For example:
model.save_word2vec_format(your_filename, binary=False, write_first_line=False)
(I'd also note: your example format, and this method, will only use single spaces between fields, **not* tabs, so your existing file-suffic of .tsv for 'tab-separated-values' would be misleading.)

How to build Numpy array from a String written in file in Python

I had to write an array of 1024 dimensional vectors in files, where it is a string.
[[[-1.94079906e-03 -2.31655642e-01 2.79239640e-02 1.65049836e-01
-2.41711065e-02 4.76662189e-01 1.43999630e-03 2.74327975e-02
1.42574485e-03 -5.95342405e-02 7.44391233e-02 -2.52876729e-01
-1.00990515e-02 -3.12404502e-02 -3.15531623e-03 -1.05645694e-02
5.35479194e-05 -2.71148677e-03 1.39582576e-02 1.48318922e-02
2.73350552e-02 1.10329792e-03 1.87656947e-03 7.87315845e-01
1.48554507e-03 2.52872050e-01 9.04035103e-03 2.23065093e-02
-7.66102970e-02 -1.07561275e-02 -8.81098136e-02 -4.76480462e-03
-4.59164307e-02 9.71463993e-02 5.88618889e-02 1.50974870e-01
5.95004633e-02 -3.18388380e-02 -7.35895988e-03 -1.16585912e-02
-1.20033743e-02 2.28719711e-02 1.69246215e-02 4.68009058e-03
4.62086290e-01 3.05133080e-03 8.51295609e-03 5.41299023e-03
-3.86441469e-01 5.54564409e-03 -6.44444255e-04 -2.51195673e-03
-2.19698269e-02 -5.54086491e-02 -9.91180446e-03 -3.82097751e-01
-6.40135631e-02 5.74917234e-02 -6.93778619e-02 -4.82289121e-02
-8.80530046e-04 -1.46750783e-04 -7.59039745e-02 -4.49791476e-02
2.48764846e-02 3.42623852e-02 -1.47593305e-01 -1.06661461e-01
-4.47107572e-03 -1.18165351e-01 -5.77774234e-02 -1.18526910e-02
5.31119347e-01 8.07319826e-04 -1.33625632e-02 5.63439801e-02
1.42297670e-01 8.73860158e-03 2.81544123e-02 4.02801447e-02
-6.31053932e-04 -2.51916498e-02 7.66465114e-03 -1.44701991e-02
-2.28392556e-01 -1.52886540e-01 -2.64241938e-02 2.32990598e-03
-4.51011993e-02 -1.23286285e-01 -2.73374505e-02 4.57140617e-02
-3.10144224e-03 1.67872999e-02 2.82388210e-01 2.89291646e-02
1.07920721e-01 -2.94156536e-03 8.14718530e-02 1.23365335e-02
5.25736660e-02 1.07018501e-01 1.12216305e-02 -6.42671343e-03
-6.08792575e-03 -2.75880508e-02 -4.29682955e-02 2.29907827e-03
-1.71477318e-01 1.06728065e-03 -8.91154166e-03 -6.74131513e-02
1.85923085e-01 6.31039217e-02 -3.01594753e-03 -8.02652538e-03
2.99957022e-03 3.97651680e-02 7.88619071e-02 -3.88861895e-02
5.77857941e-02 -2.28491463e-02 -1.84029698e-01 1.88755430e-02
9.35062673e-03 -7.68110529e-03 -1.34624686e-04 -1.70862395e-02
2.90840361e-02 3.08215886e-01 9.31615767e-04 8.56576301e-03
-1.04340032e-01 5.97063676e-02 -5.19387908e-02 -2.51019020e-02
4.86317575e-02 -9.02486816e-02 -7.01272041e-02 -7.94084519e-02
3.42463702e-02 1.30526712e-02 -3.89413163e-02 7.12394621e-03
-7.80236796e-02 6.86016073e-03 -7.09471107e-03 -8.76432285e-04
2.70982862e-01 -6.52055591e-02 -1.06929066e-02 1.09912697e-02
5.81025705e-02 5.25720865e-02 -1.09306075e-01 -6.08567521e-02
1.57058761e-02 -2.72464026e-02 -5.55893872e-03 -1.02705369e-02
7.71081820e-02 1.22725129e-01 -8.34318772e-02 -1.34621300e-02
3.10156047e-02 -2.27223411e-02 -2.04452332e-02 8.44530482e-03
1.39629871e-01 4.65201735e-02 -1.80061292e-02 2.62141787e-02
1.14859547e-02 3.29010077e-02 -6.33681715e-02 -6.66326750e-03
2.45806739e-01 6.82016835e-03 1.53852955e-01 -9.26824214e-05
-2.24408537e-01 3.46144172e-03 -3.13628651e-02 5.43741090e-03
4.37655784e-02 7.23502412e-02 -2.27418393e-02 -5.73312230e-02
-9.63647943e-03 -3.06532886e-02 -1.83402985e-01 1.51326170e-03
7.01990649e-02 5.20174392e-04 3.25092584e-01 8.53244448e-04
-6.61516309e-01 -2.40109339e-02 7.80446269e-03 -3.96349991e-04
2.09737703e-01 2.01223418e-02 -3.24580610e-01 1.17111066e-02
-2.12647036e-01 -1.07400909e-01 -2.13052216e-03 7.19884411e-02
6.29373044e-02 2.70579964e-01 2.31924746e-03 2.31584962e-02
6.68760389e-02 6.02776278e-03 1.25936240e-01 9.87441279e-03
-1.55544477e-02 9.21403050e-01 5.95429866e-03 1.69753373e-01
-2.77957093e-04 -3.74301686e-03 -8.01488161e-02 -2.92979274e-02
2.70357099e-03 2.04204336e-01 -2.55553108e-02 -4.37098294e-02
-9.27719846e-02 3.31938616e-03 -6.86550094e-03 -5.29704131e-02
4.67646532e-02 -4.76779230e-03 -2.47423232e-01 -1.95020065e-01
-1.37039032e-02 -2.88726222e-02 4.78997901e-02 -1.67194288e-02
-2.44984671e-01 4.14241031e-02 2.18765303e-01 -1.29683837e-02
-1.29538756e-02 -2.40630388e-01 -1.47552008e-03 1.04058897e-02
8.08705166e-02 2.98772845e-02 1.09445721e-01 -2.72222068e-02
3.15629435e-03 2.02676475e-01 -5.48119098e-03 1.11927085e-01
-8.10229045e-04 4.88724336e-02 -2.04598755e-02 7.28014559e-02
-7.50734936e-03 1.12967454e-01 -1.02381155e-01 -3.93344797e-02
-5.76012488e-03 -8.27285368e-03 4.68877656e-03 3.56422178e-02
7.47172013e-02 -4.50611580e-04 3.87510844e-02 5.87241072e-03
8.89619961e-02 3.71131860e-02 -1.27488390e-01 -2.87959836e-02
2.09520772e-01 6.84321998e-03 -1.79145802e-02 -4.92445230e-01
-1.11257724e-01 -3.41908028e-03 4.99965390e-03 -9.43376590e-03
1.45663433e-02 -1.44766182e-01 -7.85617332e-04 2.50194788e-01
-1.84243411e-01 -8.52207094e-02 4.91553724e-01 6.98826567e-04
9.67463851e-02 -9.53106880e-02 1.34932743e-02 9.78818908e-03
1.42090872e-01 -1.44538991e-02 3.38558876e-03 7.06599429e-02
1.05294399e-01 -1.04073426e-02 8.84406921e-03 -1.04884133e-02
1.08525844e-03 2.73697806e-04 5.48925027e-02 -1.37888163e-01
-7.36754341e-03 -1.68831810e-01 -1.55891664e-02 -1.46280183e-02
-4.65287874e-03 -4.55598114e-03 -2.31690466e-01 8.52278993e-02
3.69785540e-02 -5.14281213e-01 -3.15423198e-02 6.99804872e-02
-6.80299819e-01 5.70312254e-02 -4.68888041e-03 9.24175314e-04
1.46322310e-01 -2.26290636e-02 -1.17635960e-02 -1.97508056e-02
-5.63608184e-02 -2.35153502e-03 -3.02714780e-02 -7.00966269e-02
1.34322822e-01 -5.83322406e-01 6.99004158e-02 6.90660765e-03
-3.59833129e-02 -4.24275696e-02 -1.13462089e-02 1.26277313e-01
-2.11074743e-02 -2.75125448e-02 -1.09875022e-04 -1.36324633e-02
-1.61086857e-01 1.45391980e-03 8.35529938e-02 2.60230571e-01
-2.66209077e-02 -5.58552158e-04 -6.46227747e-02 -1.03871346e-01
7.65479207e-02 5.50469197e-03 -8.30342695e-02 -1.41060511e-02
5.78260748e-04 -7.48543143e-02 4.00875658e-02 -8.43505200e-04
1.30373640e-02 -3.70042515e-03 2.34432235e-01 -5.03952876e-02
-8.23894609e-03 5.68602094e-03 2.00182339e-03 2.67363917e-02
-1.65066063e-01 1.12882899e-02 -2.45540170e-03 -5.58771845e-03
-3.17897797e-02 3.54408443e-01 -2.19827844e-03 1.96579453e-02
-2.13856101e-01 -9.39935893e-02 -4.10447363e-03 5.64558394e-02
-7.74325207e-02 1.12799453e-02 5.74401207e-03 1.17533533e-02
3.13126147e-01 -9.65978801e-02 4.09295522e-02 -7.19228340e-03
1.61319543e-02 1.38026938e-01 -1.03539340e-02 2.02257689e-02
-1.22227691e-01 2.85219820e-03 -1.38053551e-01 1.04186237e-01
-3.85751538e-02 5.40270396e-02 2.01541111e-02 1.11547910e-01
8.12843814e-03 -2.46938601e-01 2.63076667e-02 1.17913038e-02
-3.11973467e-02 -1.92823902e-01 1.21179201e-01 -1.25329243e-02
-8.06584358e-02 1.80483628e-02 -1.24767497e-01 -9.79684740e-02
1.42583912e-02 -2.01247111e-01 1.80912524e-01 -7.99218717e-04
4.43766803e-01 -1.50329890e-02 -5.67825418e-03 -1.08014653e-02
-5.36615476e-02 -2.61940453e-02 -4.53092828e-02 1.35193672e-02
4.11850251e-02 -6.01443984e-02 -2.50824913e-02 1.62832197e-02
-3.54980752e-02 1.94167010e-02 3.73407416e-02 -1.39249265e-02
1.24431606e-02 -2.71414319e-04 2.07198528e-03 -3.13255489e-02
-9.13586060e-04 -6.02687523e-03 -2.45338219e-04 3.06239817e-02
4.73723561e-03 -5.37761077e-02 1.07429676e-01 -3.07083246e-04
1.83322672e-02 1.11524528e-02 -3.02185658e-02 8.59791264e-02
1.52892053e-01 -5.19732898e-03 3.35007943e-02 -5.18686930e-03
4.59660180e-02 -5.97646236e-02 -5.91781130e-03 -9.71765146e-02
-5.03088348e-03 -2.63293982e-02 2.98104137e-02 1.78570561e-02
-1.43652499e-01 -9.18011591e-02 -1.30667742e-02 5.08407876e-02
-1.08531557e-01 4.97847283e-03 8.63077492e-03 -9.12626833e-02
7.65377134e-02 -1.38562605e-01 1.26607893e-02 2.06802897e-02
-4.38775197e-02 -1.66922156e-02 1.40064796e-02 4.57174098e-03
-1.03261333e-03 5.39288446e-02 -2.95640323e-02 3.11757829e-02
-6.83855964e-03 4.09243908e-03 1.86475474e-04 -5.27539887e-02
-2.06441600e-02 1.07906722e-02 -3.73281129e-02 4.83028293e-02
7.07745552e-03 4.19170335e-02 4.73949760e-02 -3.53640225e-03]]
[[ -8.35226402e-02 9.30680893e-03 -1.19281253e-02 6.61145672e-02
3.26909008e-03 4.63765323e-01 3.27814883e-03 3.66053022e-02
1.09708719e-02 7.35405181e-03 -1.55491112e-02 1.80269778e-02
-3.51096364e-03 3.14430892e-02 1.74052753e-02 5.27430698e-02
1.55686750e-03 8.57205018e-02 -4.71130945e-03 -1.66305136e-02
-1.67975724e-02 -3.89260314e-02 6.36396930e-02 7.63485655e-02
-4.48105129e-04 -6.54933006e-02 2.95349136e-02 -2.45081261e-02
4.96003777e-02 6.64148927e-02 -2.33270358e-02 3.41189057e-02
1.60509553e-02 -5.32507300e-02 1.29752964e-01 1.31994952e-03
7.20134820e-04 -1.98553465e-02 -9.42229573e-03 -1.28459960e-01
9.08048358e-03 -7.04445392e-02 2.49016993e-02 -2.02601706e-03
2.32810881e-02 8.85246042e-03 -6.18432183e-03 4.91291285e-02
-1.68560803e-01 -1.95360109e-01 1.66883413e-02 4.46498543e-01
8.62153433e-03 -2.90389471e-02 -1.62739735e-02 1.17358692e-01
-7.42233777e-03 1.05169125e-01 1.42013326e-01 -8.94571014e-04
-3.26711014e-02 -1.27530540e-03 6.44282848e-02 4.75694202e-02
1.49227241e-02 -5.22350743e-02 2.38056909e-02 2.92309709e-02
-2.19096199e-01 1.55504672e-02 -1.53067306e-01 2.74171904e-02
-7.00602890e-04 6.28591049e-03 -5.55272587e-03 -1.07895516e-01
-5.65112336e-03 -5.24670519e-02 -4.89811152e-02 5.01033179e-02
6.93804584e-03 1.05955578e-01 -7.62372569e-04 8.43433514e-02
4.34672460e-03 -4.59782854e-02 8.87977891e-03 -1.24188691e-01
-1.83345191e-02 1.53444866e-02 -3.22986394e-02 6.25251094e-04
9.15350902e-05 -4.84672701e-03 -2.58674123e-03 3.35796690e-03
4.89366241e-02 4.02635749e-04 1.59860756e-02 7.69474208e-01
4.08853181e-02 4.34358567e-02 2.25415756e-03 1.78180281e-02
-1.54250145e-01 -8.23742151e-03 -2.62587331e-03 -5.17571764e-03
-1.17875308e-01 -2.17287224e-02 2.03241524e-03 3.59281600e-02
7.83091187e-02 -6.30748495e-02 -4.43855999e-03 1.38513371e-01
-1.49395345e-02 1.73051998e-01 -1.08843846e-02 -4.09610756e-03
1.47934854e-01 2.77046226e-02 9.71657410e-03 -4.75595258e-02
-8.04194286e-02 -6.39762543e-03 -1.78411976e-03 -2.07632020e-05
-1.20369075e-02 -5.30476645e-02 -2.65281554e-02 -1.27506420e-01
1.61716379e-02 -1.23544305e-03 5.12566231e-02 -2.99007017e-02
-2.24648491e-02 -1.08299348e-04 -2.56778561e-02 5.01158787e-03
1.46491397e-02 8.26944504e-03 9.98148024e-02 -1.25672504e-01
-1.02828294e-02 -1.48208633e-01 -5.26465550e-02 -1.39929978e-02
5.14968075e-02 -7.84798432e-03 1.69349450e-03 1.39911417e-02
9.87590104e-02 8.83786604e-02 -2.10539266e-01 1.15139121e-02
-2.02425104e-03 -2.96202842e-02 2.34789047e-02 -2.69730925e-03
-1.28652789e-02 -9.96383606e-04 -1.49479583e-02 2.74939630e-02
2.21133493e-02 5.40200956e-02 -1.40580133e-01 -1.88481361e-02
5.64605594e-02 8.01192969e-03 2.08442245e-04 -7.04166517e-02
-6.91418424e-02 3.14796274e-03 2.43515684e-03 5.66407405e-02
7.94060528e-03 -9.53438058e-02 1.21964351e-03 1.47800058e-01
-1.13360971e-01 2.98349423e-05 1.53450280e-01 1.23541877e-02
7.23110735e-02 -3.53798419e-02 2.02055108e-02 2.04957579e-03
2.06349175e-02 -3.23418826e-02 1.54947313e-02 3.00867227e-03
6.27451837e-02 -6.16709888e-03 -4.44535079e-04 -8.95639881e-03
-9.29646849e-05 4.07954591e-04 1.03105552e-01 -1.26244530e-01
-1.03752740e-01 7.28853717e-02 1.41500132e-02 -1.69651657e-02
-7.86132237e-04 -1.02092149e-02 -4.33625951e-02 4.45875973e-02
3.16701494e-02 -5.97860694e-01 -1.04297372e-02 -3.53601612e-02
-5.31432092e-01 1.20885514e-01 -4.41514747e-03 -1.37506695e-02
7.41118193e-02 -1.80932339e-02 -2.18909793e-02 -1.78918764e-02
-4.53138798e-02 -9.50210169e-03 -2.68109199e-02 -4.37963568e-02
2.57522136e-01 -1.55035645e-01 8.70719627e-02 2.36497819e-02
4.50039990e-02 -1.05908541e-02 -6.30994067e-02 5.25860228e-02
1.30218547e-02 -4.60572615e-02 -1.27857761e-03 -2.23273393e-02
-1.01790786e-01 3.97628173e-03 4.75442037e-03 1.58620045e-01
-1.53025975e-02 -5.05035557e-02 -1.91611588e-01 -5.24769202e-02
2.29781922e-02 1.23675652e-02 -1.08054029e-02 -5.12798950e-02
-3.13344353e-05 3.84442252e-03 2.34415475e-02 -6.06570218e-04
-8.98333564e-02 5.93989454e-02 2.30413303e-02 -1.63186044e-02
-4.73568274e-04 1.26233101e-02 -2.33891979e-02 -3.67069454e-03
-3.11445054e-02 6.57939492e-03 -7.66414171e-03 8.54648836e-03
-5.53270467e-02 6.56915456e-02 5.93487732e-02 5.15440246e-03
-9.67373177e-02 -6.51745126e-02 -3.94938029e-02 5.34577072e-02
-1.40887564e-02 -3.21616903e-02 4.82407846e-02 2.16054339e-02
1.52342409e-01 -1.26091624e-02 -3.95356715e-02 -3.49778347e-02
1.04348501e-02 7.99501091e-02 -5.54051399e-02 1.87601745e-02
-1.87667310e-01 8.61896726e-04 -3.23137492e-02 5.16451187e-02
2.22476479e-02 -8.02607462e-03 -2.70199757e-02 5.83411716e-02
1.13461642e-02 -6.43412471e-02 1.39366373e-01 5.69017865e-02
-2.33416390e-02 -2.85612494e-01 5.10325246e-02 4.62737009e-02
-1.91203970e-02 1.32384151e-03 -6.35378435e-02 3.24819842e-03
-1.32869254e-03 1.75510924e-02 1.41231939e-01 1.28516573e-02
1.02439635e-02 -4.39045802e-02 -1.10270549e-02 7.96073973e-02
5.91337262e-03 -7.50695616e-02 1.84723474e-02 9.38338228e-03
-8.35675339e-04 5.00328392e-02 -4.32583364e-03 1.02049168e-02
-5.58866095e-03 -4.91249859e-02 5.04319072e-02 4.64591458e-02
-6.06061965e-02 2.36203405e-03 6.63211709e-03 1.16420723e-02
-1.95871443e-02 -1.81973800e-02 4.64237249e-03 2.86748866e-03
5.38999680e-03 -8.34256224e-03 9.33683477e-03 -5.39150741e-03
-1.86683554e-02 2.48070788e-02 5.92112215e-03 8.56748223e-03
3.22964415e-02 -5.00624850e-02 -2.52336301e-02 9.17474180e-03
-8.92325118e-03 4.67876205e-03 -5.74534759e-02 3.73787177e-03
1.28581151e-02 -1.67223103e-02 7.50076920e-02 -3.98502016e-04
-1.61230732e-02 -2.75442414e-02 3.94548639e-04 -1.37498451e-03
-4.96492116e-03 2.53268499e-02 5.55252992e-02 -5.05645424e-02
-5.79147274e-03 -1.39349727e-02 1.05990777e-02 -4.14465889e-02
1.90671217e-02 2.38927081e-03 1.91597678e-02 7.26094469e-03
5.62381647e-05 -3.14109512e-02 -7.03963730e-03 5.72685339e-03
-4.51433298e-04 -1.14829629e-03 1.45282391e-02 -2.11534575e-02
1.55422445e-02 5.09766936e-02 -2.77528632e-02 -7.16304639e-03
-1.41595118e-02 -2.29488108e-02 -2.09072828e-02 2.64024753e-02
3.75947580e-02 3.53328399e-02 5.87556325e-03 -4.44848882e-03
3.95338349e-02 -2.64461972e-02 2.43276753e-03 -1.63620003e-02
3.14164497e-02 -8.08956474e-03 1.49463089e-02 2.09438596e-02
-8.90694279e-03 3.24987583e-02 6.67429902e-03 -1.50191346e-02
-1.16796941e-02 3.64522748e-02 -8.61222763e-03 1.09857088e-02
-3.57604139e-02 -5.16717369e-03 2.68327910e-02 3.17539498e-02
-1.13831903e-03 2.37232214e-03 8.16115085e-03 6.65428936e-02
1.27308011e-01 1.32651571e-02 -1.16856256e-03 1.92778313e-03
-5.13796732e-02 2.23806910e-02 2.64357291e-02 -9.60358977e-03
-1.81771331e-02 -2.23696785e-04 1.13886436e-02 3.41330506e-02
2.79273577e-02 3.79165076e-02 2.16118526e-03 -1.12676609e-03
-2.00524926e-03 -1.37742283e-02 -2.34187655e-02 3.20340917e-02
2.10321099e-02 4.94092591e-02 -2.68395413e-02 4.29884112e-03
5.21777458e-02 -3.28805707e-02 -2.18146648e-02 1.72189157e-03
1.45826461e-02 3.89755853e-02 2.16644220e-02 1.45681109e-02
-5.07474365e-03 2.73492723e-03 1.24841267e-02 1.98827442e-02
-5.53916628e-03 -1.07634841e-02 1.36590758e-02 -9.26163197e-02
-3.95117737e-02 -1.71744905e-03 7.74151552e-03 -1.19977084e-03
-1.42000178e-02 -3.76450969e-03 2.26605702e-02 -6.73604533e-02
-2.03648806e-02 3.09449919e-02 -3.69136743e-02 1.27421897e-02
-1.31009584e-02 -1.37193482e-02 1.25257829e-02 1.81069430e-02
-8.70318525e-03 2.53016800e-02 4.50089462e-02 -1.51383178e-02
3.90487462e-02 1.48353223e-02 -5.49035370e-02 1.52793583e-02
6.09628372e-02 2.26467788e-01 -1.58030409e-02 6.35875948e-03
-7.22567504e-03 2.31286865e-02 8.45125783e-03 9.40664485e-03
-7.69937038e-03 -4.84708603e-03 -5.00676176e-03 -1.35368295e-02
-1.90379925e-03 2.88588181e-02 1.81501191e-02 1.80631205e-02
1.93565357e-02 5.02644433e-03 6.69117644e-03 -1.11023095e-02
-1.24723874e-02 -1.13726296e-02 6.56644180e-02 2.00492796e-02
4.66159452e-03 -3.40204779e-03 1.02386642e-02 2.80533340e-02
-3.09105241e-03 6.22903183e-03 -4.17059404e-04 2.77249347e-02
-4.01747860e-02 2.38689836e-02 4.76544015e-02 3.70072108e-03
1.06910598e-02 -2.36127879e-02 3.88308056e-02 2.19260529e-03
-3.29560637e-02 -2.21122336e-02 -4.79903491e-03 1.51326843e-02
-3.50229093e-03 2.24676784e-02 1.43503872e-04 -3.17934118e-02
-1.51474942e-02 2.43635513e-02 1.99209489e-02 1.78901535e-02
-2.50796489e-02 -3.82525399e-02 -7.11742649e-03 1.94894355e-02
-2.41929526e-03 3.09266243e-02 -3.60688046e-02 1.30333030e-03
-1.69621110e-02 -4.34306217e-03 3.22814146e-03 1.35722384e-02
-3.22210952e-03 6.81779860e-03 5.64415827e-02 -4.67799557e-03
-3.43072243e-05 1.47441979e-02 1.27382390e-02 2.21132208e-02
1.00761396e-03 5.81906037e-03 -2.46797632e-02 2.25442611e-02
5.67185059e-02 1.56729892e-02 -1.27938166e-02 -4.06436957e-02
-7.34348316e-03 4.15970478e-03 5.33090569e-02 2.27547772e-02
-4.65768166e-02 -8.26780498e-03 -1.76717900e-02 1.14618763e-02
-6.11296529e-03 -9.91329923e-03 -1.77789368e-02 1.49894347e-02
2.00315397e-02 4.59903367e-02 -9.15393308e-02 -1.06830876e-02
-3.23898084e-02 -1.45315717e-03 -1.91982687e-02 5.13540730e-02
5.07519208e-03 1.16187809e-02 -7.04900697e-02 1.31804580e-02
9.46480874e-03 1.66993719e-02 9.73339472e-03 4.89528617e-03
1.25560202e-02 9.88730043e-03 2.34009465e-03 -1.93884056e-02
1.21425718e-01 1.60742402e-01 1.74952727e-02 -2.61049587e-02
2.36830972e-02 -2.52299607e-02 -3.02438326e-02 1.08230580e-02
-1.32970130e-02 -4.28082272e-02 -1.06386631e-03 -1.67271737e-02
-2.24054903e-02 2.09099753e-03 9.29628033e-03 -1.35044642e-02
5.04099466e-02 -2.71457713e-02 1.73648577e-02 2.48547047e-02
-1.89860701e-03 1.70966927e-02 -2.60377172e-02 4.39567082e-02
7.85375014e-04 1.94283966e-02 -1.33992946e-02 -2.70982515e-02
1.87142137e-02 3.46861593e-03 3.57702821e-02 2.04772372e-02
1.90474056e-02 4.41925647e-03 -7.10287225e-03 1.49543295e-02
1.38295190e-02 2.13973895e-02 2.09906921e-02 6.11540861e-03]]]
I am trying to extract it using regex (or any other method if possible).
So far I tried solutions like Extract values between square brackets ignoring single quotes but they are not working.
How could I extract these arrays and use them as numpy vectors?
You can use the numpy.fromstring() method to accomplish this task once you have read-in the file's contents. Below is a quick and dirty implementation of this (no error detection), which works with your example array.
import numpy as np
with open("test.txt", 'r') as f:
arr = np.fromstring(f.read(), np.dtype(np.float), 1024)
This would also get you there, using regular expressions:
import numpy as np
import re
with open("somefile.txt") as f:
content = f.read()
content = re.sub('[\[\n\]]', '', content)
arr = re.split(r'\s+', content)
np_arr = np.array([float(i) for i in arr])

Categories

Resources