mirror of
https://github.com/nushell/nushell.git
synced 2025-07-08 02:17:22 +02:00
* Change name from pls to dataframe * filter and rename commands * filter example * Filter example with bool mask
27 lines
642 B
Rust
27 lines
642 B
Rust
use crate::prelude::*;
|
|
use nu_engine::WholeStreamCommand;
|
|
use nu_errors::ShellError;
|
|
use nu_protocol::{Signature, UntaggedValue};
|
|
|
|
pub struct Command;
|
|
|
|
impl WholeStreamCommand for Command {
|
|
fn name(&self) -> &str {
|
|
"dataframe"
|
|
}
|
|
|
|
fn usage(&self) -> &str {
|
|
"Commands to work with polars dataframes"
|
|
}
|
|
|
|
fn signature(&self) -> Signature {
|
|
Signature::build("dataframe")
|
|
}
|
|
|
|
fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
|
|
Ok(OutputStream::one(
|
|
UntaggedValue::string(get_full_help(&Command, args.scope())).into_value(Tag::unknown()),
|
|
))
|
|
}
|
|
}
|