forked from extern/nushell
Change the usage misnomer to "description" (#13598)
# Description The meaning of the word usage is specific to describing how a command function is *used* and not a synonym for general description. Usage can be used to describe the SYNOPSIS or EXAMPLES sections of a man page where the permitted argument combinations are shown or example *uses* are given. Let's not confuse people and call it what it is a description. Our `help` command already creates its own *Usage* section based on the available arguments and doesn't refer to the description with usage. # User-Facing Changes `help commands` and `scope commands` will now use `description` or `extra_description` `usage`-> `description` `extra_usage` -> `extra_description` Breaking change in the plugin protocol: In the signature record communicated with the engine. `usage`-> `description` `extra_usage` -> `extra_description` The same rename also takes place for the methods on `SimplePluginCommand` and `PluginCommand` # Tests + Formatting - Updated plugin protocol specific changes # After Submitting - [ ] update plugin protocol doc
This commit is contained in:
committed by
GitHub
parent
3ab9f0b90a
commit
95b78eee25
2
crates/nu_plugin_polars/src/cache/get.rs
vendored
2
crates/nu_plugin_polars/src/cache/get.rs
vendored
@ -21,7 +21,7 @@ impl PluginCommand for CacheGet {
|
||||
"polars store-get"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets a Dataframe or other object from the plugin cache."
|
||||
}
|
||||
|
||||
|
2
crates/nu_plugin_polars/src/cache/list.rs
vendored
2
crates/nu_plugin_polars/src/cache/list.rs
vendored
@ -15,7 +15,7 @@ impl PluginCommand for ListDF {
|
||||
"polars store-ls"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Lists stored polars objects."
|
||||
}
|
||||
|
||||
|
2
crates/nu_plugin_polars/src/cache/rm.rs
vendored
2
crates/nu_plugin_polars/src/cache/rm.rs
vendored
@ -17,7 +17,7 @@ impl PluginCommand for CacheRemove {
|
||||
"polars store-rm"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Removes a stored Dataframe or other object from the plugin cache."
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ impl PluginCommand for AppendDF {
|
||||
"polars append"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Appends a new dataframe."
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl PluginCommand for CastDF {
|
||||
"polars cast"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Cast a column to a different dtype."
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ impl PluginCommand for ColumnsDF {
|
||||
"polars columns"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Show dataframe columns."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for DropDF {
|
||||
"polars drop"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates a new dataframe by dropping the selected columns."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for DropDuplicates {
|
||||
"polars drop-duplicates"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Drops duplicate values in dataframe."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for DropNulls {
|
||||
"polars drop-nulls"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Drops null values in dataframe."
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ impl PluginCommand for Dummies {
|
||||
"polars dummies"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates a new dataframe with dummy variables."
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ impl PluginCommand for FilterWith {
|
||||
"polars filter-with"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Filters dataframe using a mask or expression as reference."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for FirstDF {
|
||||
"polars first"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Show only the first number of rows or create a first expression"
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for GetDF {
|
||||
"polars get"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates dataframe with the selected columns."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for LastDF {
|
||||
"polars last"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates new dataframe with tail rows or creates a last expression."
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ impl PluginCommand for OpenDataFrame {
|
||||
"polars open"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Opens CSV, JSON, NDJSON/JSON lines, arrow, avro, or parquet file to create dataframe. A lazy dataframe will be created by default, if supported."
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ impl PluginCommand for PivotDF {
|
||||
"polars pivot"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Pivot a DataFrame from wide to long format."
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ impl PluginCommand for QueryDf {
|
||||
"polars query"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause."
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl PluginCommand for RenameDF {
|
||||
"polars rename"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Rename a dataframe column."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for SampleDF {
|
||||
"polars sample"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Create sample dataframe."
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ impl PluginCommand for SaveDF {
|
||||
"polars save"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson)."
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ impl PluginCommand for SchemaCmd {
|
||||
"polars schema"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Show schema for a dataframe."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for ShapeDF {
|
||||
"polars shape"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Shows column and row size for a dataframe."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for SliceDF {
|
||||
"polars slice"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates new dataframe from a slice of rows."
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ impl PluginCommand for Summary {
|
||||
"polars summary"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for TakeDF {
|
||||
"polars take"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates new dataframe using the given indices."
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ impl PluginCommand for ToDataFrame {
|
||||
"polars into-df"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Converts a list, table or record into a dataframe."
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl PluginCommand for ToNu {
|
||||
"polars into-nu"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Converts a dataframe or an expression into nushell value for access and exploration."
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ impl PluginCommand for UnpivotDF {
|
||||
"polars unpivot"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Unpivot a DataFrame from wide to long format."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for WithColumn {
|
||||
"polars with-column"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Adds a series to the dataframe."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for ExprAlias {
|
||||
"polars as"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates an alias expression."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for ExprArgWhere {
|
||||
"polars arg-where"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates an expression that returns the arguments where expression is true."
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ impl PluginCommand for ExprCol {
|
||||
"polars col"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates a named column expression."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for ExprConcatStr {
|
||||
"polars concat-str"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates a concat string expression."
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ impl PluginCommand for ExprDatePart {
|
||||
"polars datepart"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates an expression for capturing the specified datepart in a column."
|
||||
}
|
||||
|
||||
|
@ -21,13 +21,13 @@ macro_rules! expr_command {
|
||||
$name
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
$desc
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build(self.name())
|
||||
.usage($desc)
|
||||
.description($desc)
|
||||
.input_output_type(
|
||||
Type::Custom("expression".into()),
|
||||
Type::Custom("expression".into()),
|
||||
@ -76,7 +76,7 @@ macro_rules! expr_command {
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build(self.name())
|
||||
.usage($desc)
|
||||
.description($desc)
|
||||
.input_output_type(
|
||||
Type::Custom("expression".into()),
|
||||
Type::Custom("expression".into()),
|
||||
@ -127,13 +127,13 @@ macro_rules! lazy_expr_command {
|
||||
$name
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
$desc
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build(self.name())
|
||||
.usage($desc)
|
||||
.description($desc)
|
||||
.input_output_types(vec![
|
||||
(
|
||||
Type::Custom("expression".into()),
|
||||
@ -199,7 +199,7 @@ macro_rules! lazy_expr_command {
|
||||
$name
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
$desc
|
||||
}
|
||||
fn signature(&self) -> Signature {
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for ExprIsIn {
|
||||
"polars is-in"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates an is-in expression or checks to see if the elements are contained in the right series"
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ impl PluginCommand for ExprLit {
|
||||
"polars lit"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates a literal expression."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for ExprOtherwise {
|
||||
"polars otherwise"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Completes a when expression."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for ExprWhen {
|
||||
"polars when"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates and modifies a when expression."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for LazyAggregate {
|
||||
"polars agg"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Performs a series of aggregations from a group-by."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for LazyCollect {
|
||||
"polars collect"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Collect lazy dataframe into eager dataframe."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for LazyExplode {
|
||||
"polars explode"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Explodes a dataframe or creates a explode expression."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for LazyFetch {
|
||||
"polars fetch"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Collects the lazyframe to the selected rows."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for LazyFillNA {
|
||||
"polars fill-nan"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Replaces NaN values with the given expression."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for LazyFillNull {
|
||||
"polars fill-null"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Replaces NULL values with the given expression."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for LazyFilter {
|
||||
"polars filter"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Filter dataframe based in expression."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for LazyFlatten {
|
||||
"polars flatten"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"An alias for polars explode."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for ToLazyGroupBy {
|
||||
"polars group-by"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates a group-by object that can be used for other aggregations."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for LazyJoin {
|
||||
"polars join"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Joins a lazy frame with other lazy frame."
|
||||
}
|
||||
|
||||
|
@ -19,13 +19,13 @@ macro_rules! lazy_command {
|
||||
$name
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
$desc
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build(self.name())
|
||||
.usage($desc)
|
||||
.description($desc)
|
||||
.input_output_type(
|
||||
Type::Custom("dataframe".into()),
|
||||
Type::Custom("dataframe".into()),
|
||||
@ -74,7 +74,7 @@ macro_rules! lazy_command {
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build($name)
|
||||
.usage($desc)
|
||||
.description($desc)
|
||||
.input_output_type(
|
||||
Type::Custom("dataframe".into()),
|
||||
Type::Custom("dataframe".into()),
|
||||
@ -122,7 +122,7 @@ macro_rules! lazy_command {
|
||||
$name
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
$desc
|
||||
}
|
||||
fn signature(&self) -> Signature {
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for LazyMedian {
|
||||
"polars median"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Median value from columns in a dataframe or creates expression for an aggregation"
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl PluginCommand for LazyQuantile {
|
||||
"polars quantile"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Aggregates the columns to the selected quantile."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for LazySelect {
|
||||
"polars select"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Selects columns from lazyframe."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for LazySortBy {
|
||||
"polars sort-by"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Sorts a lazy dataframe based on expression(s)."
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ impl PluginCommand for ToLazyFrame {
|
||||
"polars into-lazy"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Converts a dataframe into a lazy dataframe."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for AllFalse {
|
||||
"polars all-false"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns true if all values are false."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for AllTrue {
|
||||
"polars all-true"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns true if all values are true."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for ArgMax {
|
||||
"polars arg-max"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Return index for max value in series."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for ArgMin {
|
||||
"polars arg-min"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Return index for min value in series."
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ impl PluginCommand for Cumulative {
|
||||
"polars cumulative"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Cumulative calculation for a series."
|
||||
}
|
||||
|
||||
|
@ -18,11 +18,11 @@ impl PluginCommand for AsDate {
|
||||
"polars as-date"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
r#"Converts string to date."#
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
fn extra_description(&self) -> &str {
|
||||
r#"Format example:
|
||||
"%Y-%m-%d" => 2021-12-31
|
||||
"%d-%m-%Y" => 31-12-2021
|
||||
|
@ -20,11 +20,11 @@ impl PluginCommand for AsDateTime {
|
||||
"polars as-datetime"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
r#"Converts string to datetime."#
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
fn extra_description(&self) -> &str {
|
||||
r#"Format example:
|
||||
"%y/%m/%d %H:%M:%S" => 21/12/31 12:54:98
|
||||
"%y-%m-%d %H:%M:%S" => 2021-12-31 24:58:01
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetDay {
|
||||
"polars get-day"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets day from date."
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ impl PluginCommand for GetDay {
|
||||
command(plugin, engine, call, input).map_err(LabeledError::from)
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
fn extra_description(&self) -> &str {
|
||||
""
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetHour {
|
||||
"polars get-hour"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets hour from date."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for GetMinute {
|
||||
"polars get-minute"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets minute from date."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetMonth {
|
||||
"polars get-month"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets month from date."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetNanosecond {
|
||||
"polars get-nanosecond"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets nanosecond from date."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetOrdinal {
|
||||
"polars get-ordinal"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets ordinal from date."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetSecond {
|
||||
"polars get-second"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets second from date."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetWeek {
|
||||
"polars get-week"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets week from date."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetWeekDay {
|
||||
"polars get-weekday"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets weekday from date."
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl PluginCommand for GetYear {
|
||||
"polars get-year"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Gets year from date."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for ArgSort {
|
||||
"polars arg-sort"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns indexes for a sorted series."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for ArgTrue {
|
||||
"polars arg-true"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns indexes where values are true."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for ArgUnique {
|
||||
"polars arg-unique"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns indexes for unique values."
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl PluginCommand for SetWithIndex {
|
||||
"polars set-with-idx"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Sets value in the given index."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for IsDuplicated {
|
||||
"polars is-duplicated"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates mask indicating duplicated values."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for IsNotNull {
|
||||
"polars is-not-null"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates mask where value is not null."
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl PluginCommand for IsNull {
|
||||
"polars is-null"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates mask where value is null."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for IsUnique {
|
||||
"polars is-unique"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Creates mask indicating unique values."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for NotSeries {
|
||||
"polars not"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Inverts boolean mask."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for SetSeries {
|
||||
"polars set"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Sets value where given mask is true."
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ impl PluginCommand for NNull {
|
||||
"polars count-null"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Counts null values."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for NUnique {
|
||||
"polars n-unique"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Counts unique values."
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ impl PluginCommand for Rolling {
|
||||
"polars rolling"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Rolling calculation for a series."
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ impl PluginCommand for Shift {
|
||||
"polars shift"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Shifts the values by a given period."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for Concatenate {
|
||||
"polars concatenate"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Concatenates strings with other array."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for Contains {
|
||||
"polars contains"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Checks if a pattern is contained in a string."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for Replace {
|
||||
"polars replace"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Replace the leftmost (sub)string by a regex pattern."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for ReplaceAll {
|
||||
"polars replace-all"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Replace all (sub)strings by a regex pattern."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for StrLengths {
|
||||
"polars str-lengths"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Get lengths of all strings."
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl PluginCommand for StrSlice {
|
||||
"polars str-slice"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Slices the string from the start position until the selected length."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ impl PluginCommand for StrFTime {
|
||||
"polars strftime"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Formats date based on string rule."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for ToLowerCase {
|
||||
"polars lowercase"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Lowercase the strings in the column."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl PluginCommand for ToUpperCase {
|
||||
"polars uppercase"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Uppercase the strings in the column."
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ impl PluginCommand for Unique {
|
||||
"polars unique"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns unique values from a dataframe."
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ impl PluginCommand for ValueCount {
|
||||
"polars value-counts"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns a dataframe with the counts for unique values in series."
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ impl PluginCommand for PolarsCmd {
|
||||
"polars"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Operate with data in a dataframe format."
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ impl PluginCommand for PolarsCmd {
|
||||
.input_output_types(vec![(Type::Nothing, Type::String)])
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
fn extra_description(&self) -> &str {
|
||||
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user