From 2f5eeab56745ba96662f05aade730e45bf74d796 Mon Sep 17 00:00:00 2001 From: "notryanb@gmail.com" Date: Wed, 16 Oct 2019 20:45:23 -0400 Subject: [PATCH] fix typos and incorrect commands --- docs/commands/average.md | 11 +++++++---- docs/commands/sum.md | 15 ++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/commands/average.md b/docs/commands/average.md index 701ad6091..d4095e518 100644 --- a/docs/commands/average.md +++ b/docs/commands/average.md @@ -1,5 +1,8 @@ -# average This command allows you to calculate the average of values in a column. ## Examples -To get the average of the file sizes in a directory, simply pipe the size column from the ls command to the sum command. +# average +This command allows you to calculate the average of values in a column. + +## Examples +To get the average of the file sizes in a directory, simply pipe the size column from the ls command to the average command. ```shell > ls | get size | average @@ -19,8 +22,8 @@ To get the average of the file sizes in a directory, simply pipe the size column ━━━━━━━━━ ``` -Note that average only works for integer and byte values at the moment, and if the shell doesn't recognize the values in a column as one of those types, it will return an error. -One way to solve this is to convert each row to an integer and then pipe the result to `average` +Note that average only works for integer and byte values. If the shell doesn't recognize the values in a column as one of those types, it will return an error. +One way to solve this is to convert each row to an integer when possible and then pipe the result to `average` ```shell > open tests/fixtures/formats/caco3_plastics.csv | get tariff_item | average diff --git a/docs/commands/sum.md b/docs/commands/sum.md index f20dcb5f3..7482ca0c5 100644 --- a/docs/commands/sum.md +++ b/docs/commands/sum.md @@ -1,4 +1,7 @@ -# sum This command allows you to calculate the sum of values in a column. ## Examples +# sum +This command allows you to calculate the sum of values in a column. + +## Examples To get the sum of the file sizes in a directory, simply pipe the size column from the ls command to the sum command. ```shell @@ -10,7 +13,7 @@ To get the sum of the file sizes in a directory, simply pipe the size column fro ━━━━━━━━━ ``` -To get the sum of the characters in your present working directory. +To get the sum of the characters that make up your present working directory. ```shell > pwd | split-row / | size | get chars | sum ━━━━━━━━━ @@ -20,13 +23,11 @@ To get the sum of the characters in your present working directory. ━━━━━━━━━ ``` - - -Note that sum only works for integer and byte values at the moment, and if the shell doesn't recognize the values in a column as one of those types, it will return an error. -One way to solve this is to convert each row to an integer and then pipe the result to `sum` +Note that sum only works for integer and byte values. If the shell doesn't recognize the values in a column as one of those types, it will return an error. +One way to solve this is to convert each row to an integer when possible and then pipe the result to `sum` ```shell -> open tests/fixtures/formats/caco3_plastics.csv | get tariff_item | average +> open tests/fixtures/formats/caco3_plastics.csv | get tariff_item | sum error: Unrecognized type in stream: Primitive(String("2509000000")) - shell:1:0 1 | open tests/fixtures/formats/caco3_plastics.csv | get tariff_item | sum