From 18c9fd3d54db6f4b3d2cd6084e594e6d0838b3c5 Mon Sep 17 00:00:00 2001 From: drizk1 Date: Tue, 13 Aug 2024 16:58:26 -0400 Subject: [PATCH] markdown new line formatting --- docs/examples/UserGuide/ibis_comp.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/examples/UserGuide/ibis_comp.jl b/docs/examples/UserGuide/ibis_comp.jl index dd2810f..cb0058d 100644 --- a/docs/examples/UserGuide/ibis_comp.jl +++ b/docs/examples/UserGuide/ibis_comp.jl @@ -31,6 +31,7 @@ # ``` # ## Previewing the data # TidierDB and Ibis use `head`/`@head` to preview the first rows of a dataset. + # Ibis # ```python # mtcars.head(6) @@ -108,6 +109,7 @@ # ## Creating new columns # Both TidierDB and Ibis use `mutate`/`@mutate` to add new columns + # Ibis # ```python # ( @@ -166,6 +168,7 @@ # ## Sorting columns # Ibis uses `order_by` similar to SQLs `ORDER BY` + # Ibis # ```python # mtcars.order_by(_.mpg) @@ -190,6 +193,7 @@ # └─────────────────────┴─────────┴───────┴─────────┴───────┴─────────┴─────────┴─────────┴───────┴───────┴───────┴───────┘ # ``` # While TidierDB uses `@arrange` like TidierData.jl + # TidierDB # ``` # @chain t(mtcars) @arrange(mpg) @collect @@ -217,6 +221,7 @@ # ## Selecting columns # In Ibis, columns must be prefixed with the table name, or in this case `_`, or they can be given as a string. Finally to using helper functions like `startswith` requires importing selectors as above. + # Ibis # ``` # mtcars.select(s.startswith("m"), "drat", _.wt) @@ -241,6 +246,7 @@ # └───────────────────┴─────────┴─────────┴─────────┘ # ``` # TidierDB does not require names to be prefixed and, like TidierData, tidy column selection with `starts_with`, `ends_with`, and `contains` is supported at base. TidierDB also supports providing column names as strings, although this would only be needed in the setting of renaming a column with a space in it. + # TidierDB # ``` # @chain t(mtcars) @select(starts_with("m"), "drat", wt) @collect @@ -268,6 +274,7 @@ # ## Multi step queries and summarizing # Aggregating data is done with `aggregate` in Ibis and `@summarize` in TidierDB. To group data, Ibis uses `by = ` within the `aggregate` call vs TidierDB adheres to `@group_by` convention + # Ibis # ``` # mtcars.aggregate( @@ -288,6 +295,7 @@ # └───────┴──────────┴────────────┘ # ``` # In TidierDB, `@filter` will automatically determine whether the criteria belong in a `WHERE` or `HAVING` SQL clause. + # TidierDB # ``` # @chain t(mtcars) begin @@ -309,6 +317,7 @@ # ## Renaming columns # Both tools use `rename`/@rename to rename columns + # Ibis # ```python # mtcars.rename(make_model = "model").select(_.make_model)