Revert "Make $ on variable names optional (#6434)" (#6446)

This reverts commit 3cb9147f22.
This commit is contained in:
JT
2022-09-06 05:42:47 +12:00
committed by GitHub
parent 14512988ba
commit d86350af80
5 changed files with 9 additions and 43 deletions

View File

@ -32,7 +32,7 @@ impl Command for AppendDF {
vec![
Example {
description: "Appends a dataframe as new columns",
example: r#"let a = ([['a' 'b']; [1 2] [3 4]] | into df);
example: r#"let a = ([[a b]; [1 2] [3 4]] | into df);
$a | append $a"#,
result: Some(
NuDataFrame::try_from_columns(vec![
@ -59,7 +59,7 @@ impl Command for AppendDF {
},
Example {
description: "Appends a dataframe merging at the end of columns",
example: r#"let a = ([['a' 'b']; [1 2] [3 4]] | into df);
example: r#"let a = ([[a b]; [1 2] [3 4]] | into df);
$a | append $a --col"#,
result: Some(
NuDataFrame::try_from_columns(vec![

View File

@ -36,9 +36,9 @@ impl Command for DropNulls {
vec![
Example {
description: "drop null values in dataframe",
example: r#"let my_df = ([[a b]; [1 2] [3 0] [1 2]] | into df);
let res = ($my_df.b / $my_df.b);
let a = ($my_df | with-column $res --name 'res');
example: r#"let df = ([[a b]; [1 2] [3 0] [1 2]] | into df);
let res = ($df.b / $df.b);
let a = ($df | with-column $res --name res);
$a | drop-nulls"#,
result: Some(
NuDataFrame::try_from_columns(vec![

View File

@ -38,9 +38,9 @@ impl Command for TakeDF {
vec![
Example {
description: "Takes selected rows from dataframe",
example: r#"let my_df = ([[a b]; [4 1] [5 2] [4 3]] | into df);
example: r#"let df = ([[a b]; [4 1] [5 2] [4 3]] | into df);
let indices = ([0 2] | into df);
$my_df | take $indices"#,
$df | take $indices"#,
result: Some(
NuDataFrame::try_from_columns(vec![
Column::new(