Dataframe feature for plugins (#3424)

This commit is contained in:
Fernando Herrera
2021-05-13 10:49:46 +01:00
committed by GitHub
parent 9b8b1bad57
commit f5fcf9d635
5 changed files with 20 additions and 1 deletions

View File

@ -400,6 +400,14 @@ pub fn value_to_json_value(v: &Value) -> Result<serde_json::Value, ShellError> {
}
UntaggedValue::Table(l) => serde_json::Value::Array(json_list(l)?),
#[cfg(feature = "dataframe")]
UntaggedValue::Dataframe(_) => {
return Err(ShellError::labeled_error(
"Cannot convert dataframe",
"Cannot convert dataframe",
&v.tag,
))
}
UntaggedValue::Error(e) => return Err(e.clone()),
UntaggedValue::Block(_) | UntaggedValue::Primitive(Primitive::Range(_)) => {
serde_json::Value::Null