DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
convert pandas dataframe to dict with a column as key
df.set_index('columnName').T.to_dict()
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#convert
#pandas
#dataframe
#dict
#column
#key
ADD COMMENT
Topic
COMMENT
Name
2+5 =
Submit