mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:25:38 +02:00
Lazy dataframes (#5546)
* lazyframe definition * expressions and lazy frames * new alias expression * more expression commands * updated to polars main * more expressions and groupby * more expressions, fetch and sort-by * csv reader * removed open csv * unique function * joining functions * join lazy frames commands with eager commands * corrected tests * Update .gitignore * Update .gitignore Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
This commit is contained in:
@ -238,6 +238,31 @@ impl FromValue for Vec<String> {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromValue for Vec<bool> {
|
||||
fn from_value(v: &Value) -> Result<Self, ShellError> {
|
||||
match v {
|
||||
Value::List { vals, .. } => vals
|
||||
.iter()
|
||||
.map(|val| match val {
|
||||
Value::Bool { val, .. } => Ok(*val),
|
||||
c => Err(ShellError::CantConvert(
|
||||
"bool".into(),
|
||||
c.get_type().to_string(),
|
||||
c.span()?,
|
||||
None,
|
||||
)),
|
||||
})
|
||||
.collect::<Result<Vec<bool>, ShellError>>(),
|
||||
v => Err(ShellError::CantConvert(
|
||||
"bool".into(),
|
||||
v.get_type().to_string(),
|
||||
v.span()?,
|
||||
None,
|
||||
)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FromValue for CellPath {
|
||||
fn from_value(v: &Value) -> Result<Self, ShellError> {
|
||||
let span = v.span()?;
|
||||
|
Reference in New Issue
Block a user