pyexcel.dict_to_array¶
-
pyexcel.
dict_to_array
(the_dict, with_keys=True)[source]¶ Convert a dictionary of columns to an array
The example dict is:
{ "Column 1": [1, 2, 3], "Column 2": [5, 6, 7, 8], "Column 3": [9, 10, 11, 12, 13], }
The output will be:
[ ["Column 1", "Column 2", "Column 3"], [1, 5, 9], [2, 6, 10], [3, 7, 11], ['', 8, 12], ['', '', 13] ]
Parameters: - the_dict (dict) – the dictionary to be converted.
- with_keys (bool) – to write the keys as the first row or not