Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing ColSpec interface in Select and Reject #31

Merged
merged 2 commits into from
Apr 3, 2022
Merged

Implementing ColSpec interface in Select and Reject #31

merged 2 commits into from
Apr 3, 2022

Conversation

eliascarv
Copy link
Member

@eliascarv eliascarv commented Apr 3, 2022

To implement the ColSpec interface, the following steps must be performed:
1 - add colspec fied:

struct MyTransform{S<:ColSpec,#= other type params =#}
  colspec::S
  # other fileds
end

2 - using _filter(colspec, cols) internal function:

function apply(transform::MyTransform, table)
  allcols = Tables.columnnames(table)
  # selected columns
  cols = _filter(transform.colspec, allcols)
  # code...
end

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2022

Codecov Report

Merging #31 (08909ba) into master (fcf126b) will decrease coverage by 0.39%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   92.73%   92.34%   -0.40%     
==========================================
  Files          16       16              
  Lines         413      405       -8     
==========================================
- Hits          383      374       -9     
- Misses         30       31       +1     
Impacted Files Coverage Δ
src/transforms/colspec.jl 100.00% <ø> (ø)
src/transforms/select.jl 91.30% <90.90%> (-2.21%) ⬇️
src/transforms/filter.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcf126b...08909ba. Read the comment docs.

@eliascarv eliascarv requested a review from juliohm April 3, 2022 14:33
src/transforms/select.jl Outdated Show resolved Hide resolved
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
@juliohm juliohm merged commit 1387167 into JuliaML:master Apr 3, 2022
@eliascarv eliascarv deleted the colspec-select branch April 3, 2022 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants