vice.yields.agb.settings.todict¶
Returns the dataframe as a standard python dictionary
Signature: x.todict()
Parameters¶
- x
dataframe
An instance of this class
Returns¶
- copy
dict
A dictionary copy of the dataframe.
Note
Python dictionaries are case-sensitive, and are thus less flexible than this class.
Example Code¶
>>> import vice
>>> example = vice.dataframe({
"a": [1, 2, 3],
"b": [4, 5, 6],
"c": [7, 8, 9]})
>>> example
vice.dataframe{
a --------------> [1, 2, 3]
b --------------> [4, 5, 6]
c --------------> [7, 8, 9]
}
>>> example.todict()
{'a': [1, 2, 3], 'b': [4, 5, 6], 'c': [7, 8, 9]}