Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

df to dict

>>> df.set_index('ID').T.to_dict('list')
{'p': [1, 3, 2], 'q': [4, 3, 2], 'r': [4, 0, 9]}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #df #dict
ADD COMMENT
Topic
Name
9+9 =