1 | initial version |
You can convert a DataFrame
from Polars to serde_json::Value
using serialization in the following way:
DataFrame
to a JSON string.let df = /* your dataframe */;
let json_str = df.to_json().unwrap();
serde_json::Value
.let json_val: serde_json::Value = serde_json::from_str(&json_str).unwrap();
The json_val
variable will hold the deserialized JSON value of the DataFrame
.