to_dataframe

Function to_dataframe 

Source
pub fn to_dataframe(value: &Value) -> Result<DataFrame>
Expand description

Try to convert any Value to a DataFrame

ยงExamples

use dsq_core::utils::{object, array, to_dataframe};
use dsq_core::Value;

let data = array([
    object([("name", Value::string("Alice")), ("age", Value::int(30))]),
    object([("name", Value::string("Bob")), ("age", Value::int(25))]),
]);

let df = to_dataframe(&data).unwrap();
assert_eq!(df.height(), 2);