擅长:python、mysql、java
<pre><code>first_ndarray = [['267'],
['354', '783'],
['21488' ],
['6063A' ],
['86R' ],
['969' ],
['332'],
['630' ],
['788' ],
['8' ],
['27'],
['278'],
['262' ,'86K']]
second_ndarray = [['JBS'],
['Cargill' ,'Harris Ranch'],
['One World'],
['Central Valley'],
['Cargill'],
['JBS'],
['FPL'],
['CS Beef'],
['Aurora Pack'],
['National Beef'],
['Creekstone'],
['Tyson'],
['National Beef', 'Cargill']]
res={}
for i in range(len(first_ndarray)):
values = first_ndarray[i]
keys=second_ndarray[i]
dictionary = dict(zip(keys, values))
res.update(dictionary)
print(res)
</code></pre>
<p>输出:</p>
<pre><code>{'Aurora Pack': '788',
'CS Beef': '630',
'Cargill': '86K',
'Central Valley': '6063A',
'Creekstone': '27',
'FPL': '332',
'Harris Ranch': '783',
'JBS': '969',
'National Beef': '262',
'One World': '21488',
'Tyson': '278'}
</code></pre>