-
DataFrame.to_dict(orient='dict')
[source] -
Convert DataFrame to dictionary.
Parameters: orient : str {?dict?, ?list?, ?series?, ?split?, ?records?, ?index?}
Determines the type of the values of the dictionary.
- dict (default) : dict like {column -> {index -> value}}
- list : dict like {column -> [values]}
- series : dict like {column -> Series(values)}
- split : dict like {index -> [index], columns -> [columns], data -> [values]}
- records : list like [{column -> value}, ... , {column -> value}]
-
index : dict like {index -> {column -> value}}
New in version 0.17.0.
Abbreviations are allowed.
s
indicatesseries
andsp
indicatessplit
.Returns: result : dict like {column -> {index -> value}}
DataFrame.to_dict()
2017-01-12 04:46:41
Please login to continue.