JuliaML / TableTransforms.jl

Transforms and pipelines with tabular data in Julia
https://juliaml.github.io/TableTransforms.jl/stable
MIT License
103 stars 15 forks source link

Add `Map` transform #187

Closed eliascarv closed 1 year ago

eliascarv commented 1 year ago

The Map transform applies a function to table columns using the map function. The following codes are equivalent:

table |> Map([:a, :b] => ((a, b) -> 2a + b) => :c)
table.c = map((a, b) -> 2a + b, table.a, table.b)
codecov-commenter commented 1 year ago

Codecov Report

Merging #187 (1aa9dca) into master (9aeb688) will decrease coverage by 4.92%. The diff coverage is 0.00%.

:exclamation: Current head 1aa9dca differs from pull request most recent head 69444cb. Consider uploading reports for the commit 69444cb to get more accurate results

@@            Coverage Diff             @@
##           master     #187      +/-   ##
==========================================
- Coverage   91.76%   86.85%   -4.92%     
==========================================
  Files          30       31       +1     
  Lines        1008     1065      +57     
==========================================
  Hits          925      925              
- Misses         83      140      +57     
Files Changed Coverage Δ
src/TableTransforms.jl 100.00% <ø> (ø)
src/transforms.jl 98.61% <ø> (ø)
src/transforms/map.jl 0.00% <0.00%> (ø)