Skip to content

Commit

Permalink
markdown new line formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
drizk1 committed Aug 13, 2024
1 parent 4c141ed commit 18c9fd3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/examples/UserGuide/ibis_comp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -108,6 +109,7 @@

# ## Creating new columns
# Both TidierDB and Ibis use `mutate`/`@mutate` to add new columns

# Ibis
# ```python
# (
Expand Down Expand Up @@ -166,6 +168,7 @@

# ## Sorting columns
# Ibis uses `order_by` similar to SQLs `ORDER BY`

# Ibis
# ```python
# mtcars.order_by(_.mpg)
Expand All @@ -190,6 +193,7 @@
# └─────────────────────┴─────────┴───────┴─────────┴───────┴─────────┴─────────┴─────────┴───────┴───────┴───────┴───────┘
# ```
# While TidierDB uses `@arrange` like TidierData.jl

# TidierDB
# ```
# @chain t(mtcars) @arrange(mpg) @collect
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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(
Expand All @@ -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
Expand All @@ -309,6 +317,7 @@

# ## Renaming columns
# Both tools use `rename`/@rename to rename columns

# Ibis
# ```python
# mtcars.rename(make_model = "model").select(_.make_model)
Expand Down

0 comments on commit 18c9fd3

Please sign in to comment.