We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53a2d65 commit d445835Copy full SHA for d445835
src/transforms/unit.jl
@@ -5,15 +5,25 @@
5
"""
6
Unit(unit)
7
8
-TODO
+Converts the units of all columns in the table to `unit`.
9
10
Unit(cols₁ => unit₁, cols₂ => unit₂, ..., colsₙ => unitₙ)
11
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).
17
18
# Examples
19
20
```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")
27
```
28
29
struct Unit <: StatelessFeatureTransform
0 commit comments