Skip to content

Commit

Permalink
added table derived column dark.
Browse files Browse the repository at this point in the history
  • Loading branch information
djl11 committed Feb 22, 2025
1 parent 4c6f136 commit 0dcaba3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions demo_testing/derived_entry.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import unify
import random
random.seed(0)

unify.activate("derived_entry")
unify.activate("derived_entry", overwrite=True)

for _ in range(20):
x = random.random()
y = random.random()
unify.log(
x=random.random(),
y=random.random()
x=x,
y=y,
length=(x**2 + y**2)**0.5
)
2 changes: 1 addition & 1 deletion demo_testing/gender_loc_salary.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unify
unify.activate("gender_loc_salary")
unify.activate("gender_loc_salary", overwrite=True)
import random

gender_factors = {"male": 1500, "female": 750}
Expand Down
3 changes: 2 additions & 1 deletion interfaces/tables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,10 @@ for _ in range(20):

We just need to provide the expression `(x**2 + y**2)**0.5`:

GIF
<img class="dark-light" width="100%" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/refs/heads/main/img/externally_linked/table_derived_column_dark.gif"/>

Filtering, grouping, and sorting all work on derived columns, just like any other.
However, derived columns *also* support updating their equation.

GIF

Expand Down

0 comments on commit 0dcaba3

Please sign in to comment.