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

fix: add sliced string as a separate column #71

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

premsrii
Copy link
Collaborator

StringSlicerTransformer currently slices a string in place. After this PR, it would return the original column, and the sliced string as a separate column.

For example, for the dataframe,

       foo  bar
    0  abc  jkl
    1  def  mno
    2  ghi  pqr

the transformer previously returned:

      foo bar
    0  ac  jk
    1  df  mn
    2  gi  pq

but now, it returns:

       foo  bar foo_slice bar_slice
    0  abc  jkl        ac        jk
    1  def  mno        df        mn
    2  ghi  pqr        gi        pq

@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #71 (8a6dce9) into develop (3983446) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop      #71      +/-   ##
===========================================
+ Coverage    99.36%   99.41%   +0.05%     
===========================================
  Files            9        9              
  Lines          469      511      +42     
===========================================
+ Hits           466      508      +42     
  Misses           3        3              
Impacted Files Coverage Δ
src/sk_transformers/__init__.py 100.00% <ø> (ø)
src/sk_transformers/deep_transformer.py 100.00% <ø> (ø)
src/sk_transformers/generic_transformer.py 99.35% <ø> (ø)
src/sk_transformers/number_transformer.py 100.00% <ø> (ø)
src/sk_transformers/datetime_transformer.py 100.00% <100.00%> (ø)
src/sk_transformers/string_transformer.py 98.37% <100.00%> (ø)
src/sk_transformers/utils.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@premsrii premsrii marked this pull request as ready for review January 25, 2023 12:15
@premsrii premsrii merged commit 743f617 into develop Jan 25, 2023
@premsrii premsrii deleted the fix_string_transformer branch January 25, 2023 12:48
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.

2 participants