mirror of
https://github.com/nushell/nushell.git
synced 2025-05-06 07:52:57 +00:00
Enhance polars plugin documentation (#15250)
This PR (based on #15249 and #15248 because it mentions them) adds extra documentation to the main polars command outlining the main datatypes that are used by the plugin. The lack of a description of the types involved in `polars xxx` commands was quite confusing to me when I started using the plugin and this is a first try improving it. I didn't find a better place but please let me know what you think.
This commit is contained in:
parent
551fecd10d
commit
087fe484f6
@ -24,7 +24,21 @@ impl PluginCommand for PolarsCmd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn extra_description(&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."
|
r#"
|
||||||
|
You must use one of the subcommands below. Using this command as-is will only produce this help message.
|
||||||
|
|
||||||
|
The following are the main datatypes (wrapped from Polars) that are used by these subcommands:
|
||||||
|
|
||||||
|
Lazy and Strict dataframes (called `NuLazyFrame` and `NuDataFrame` in error messages) are the main
|
||||||
|
data structure.
|
||||||
|
|
||||||
|
Expressions, representing various column operations (called `NuExpression`), are passed to many commands such as
|
||||||
|
`polars filter` or `polars with-column`. Most nushell operators are supported in these expressions, importantly
|
||||||
|
arithmetic, comparison and boolean logical.
|
||||||
|
|
||||||
|
Groupbys (`NuLazyGroupBy`), the output of a `polars group-by`, represent a grouped dataframe and are typically piped
|
||||||
|
to the `polars agg` command with some column expressions for aggregation which then returns a dataframe.
|
||||||
|
"#
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run(
|
fn run(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user