-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Duplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalize
Description
The to_json() I/O command current provides the following output:
split dict like {index -> [index], columns -> [columns], data -> [values]}
records list like [{column -> value}, ... , {column -> value}]
index dict like {index -> {column -> value}}
columns dict like {column -> {index -> value}}
values just the values array
It would be handy if the output could also be provided in the format:
mdarray [ [index1,value1a,value1b,...] , [index2,value2a,value2b,...], ... ]
This format is, for instance, used by the DyGraphs JS library for plotting data.
The following command provides the output I am looking for:
np.column_stack((df.index,df.as_matrix())).tolist()
(where df
is a DataFrame)
Metadata
Metadata
Assignees
Labels
Duplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalize