Answers for "python dictionary values to array"

0

python dictionary to array

dict = {"a": 1, "b": 2, "c": 3, "d": 4}

data = list(dict.items())
an_array = np.array(data)

print(an_array)
OUTPUT
[['a' '1']
 ['b' '2']
 ['c' '3']
 ['d' '4']]
Posted by: Guest on May-06-2020
2

list of dictionary values

d.values()
Posted by: Guest on March-10-2020

Code answers related to "python dictionary values to array"

Python Answers by Framework

Browse Popular Code Answers by Language