DataFrame.fromJsonAsMapOfLists constructor

DataFrame.fromJsonAsMapOfLists(
  1. String jsonString, {
  2. Map<String, ColumnType>? types,
})

A data frame built from a json string representation of a map of lists.

Example:

final d = DataFrame.fromJsonAsMapOfLists("""
  {
    "a": [1, 3, 5],
    "b": [5.1, 2.7, -0.9],
    "c": ["red", "green", "red"]
  }
""");
print(d);

.-.----.-------.
|a|b   |c      |
:-+----+-------:
|1|5.1 |red    |
|3|2.7 |green  |
|5|-0.9|red    |
'-'----'-------'

Implementation

factory DataFrame.fromJsonAsMapOfLists(
  String jsonString, {
  Map<String, ColumnType>? types,
}) =>
    jsonString.parseAsMapOfLists(types: types ?? {});