Skip to content

Commit d445835

Browse files
committed
Add docstring
1 parent 53a2d65 commit d445835

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/transforms/unit.jl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,25 @@
55
"""
66
Unit(unit)
77
8-
TODO
8+
Converts the units of all columns in the table to `unit`.
99
1010
Unit(cols₁ => unit₁, cols₂ => unit₂, ..., colsₙ => unitₙ)
1111
12-
TODO
12+
Converts the units of selected columns `cols₁`, `cols₂`, ..., `colsₙ`
13+
to `unit₁`, `unit₂`, ... `unitₙ`.
14+
15+
The column selection can be a single column identifier (index or name),
16+
a collection of identifiers or a regular expression (regex).
1317
1418
# Examples
1519
1620
```julia
21+
Unit(u"m")
22+
Unit(1 => u"km", :b => u"K", "c" => u"s")
23+
Unit([2, 3] => u"cm")
24+
Unit([:a, :c] => u"cm")
25+
Unit(["a", "c"] => u"cm")
26+
Unit(r"abc" => u"km")
1727
```
1828
"""
1929
struct Unit <: StatelessFeatureTransform

0 commit comments

Comments
 (0)