Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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']]
Source by kite.com #
 
PREVIOUS NEXT
Tagged: #python #dictionary #array
ADD COMMENT
Topic
Name
8+8 =