DataFrame.to_dict (orient = 'dict') English translation of the document

This article is reproduced from  https://blog.csdn.net/llx1026/article/details/77929287

DataFrame.to_dict (orient = 'dict')
will be converted to the format of the data dictionary DataFrame form
parameters: Parameter orient course may be string { 'dict', 'list' , 'series',' split ',' records', ' } is any index 'one kind of value to determine the type of dictionary
dictionary dict (default): {similar column: {index: value}} this format dictionary
list list: {similar column: [value]} this form dictionary
sequence series: {similar column: SEQ (value)} this form of dictionary
exploded split: {index similar to: [index], column: [column], data: [value]} this form of dictionaries
records recorded: similar [{column: value}, ..., {column: value}] this form of the list of
the index index: index is similar to {: {column: value}} this form of the dictionary
in the new version 0.17 .0 allowed abbreviations, s indicates the sequence, sp represents division
returns: results: like {column: {index: value}} this form of dictionaries


Guess you like

Origin www.cnblogs.com/xin-qing3/p/11201491.html