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

feature/StringConcatenator #52

Conversation

davidhopkinson26
Copy link
Contributor

Added transfoormer StringConcatenator to strings.py. It concatenates input coolumns into a single string output column.

Added test module and example notebook.

@davidhopkinson26 davidhopkinson26 changed the title StringConcatenator feature/StringConcatenator Dec 13, 2022
TommyMatthews

This comment was marked as duplicate.


def transform(self, X):
"""
Concatenates values into one string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again these descriptions feel a bit vague

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"metadata": {},
"source": [
"# StringConcatenator\n",
"This notebook shows the functionality of the `StringConcatenator` class. This transformer joins values from different columns into a new string in a new column."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same again here if we're changing values here to something more specific

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


class StringConcatenator(BaseTransformer):
"""
Transformer to concatenate values from a few columns into 1 string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry the first comment (repeated below) should have been about the "concatenate values from a few columns" in this docstring - all the others reference this with "again"

This feels a bit vague - not immediately clear that values can be any datatype, maybe:

Transform to combine data from specified columns, of mixed datatypes, into a new column containing one string?

(will this work on e.g. a column of dictionaries?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"cell_type": "markdown",
"metadata": {},
"source": [
"# StringConcatenator\n",
"This notebook shows the functionality of the `StringConcatenator` class. This transformer joins values from different columns into a new string in a new column."
"This notebook shows the functionality of the `StringConcatenator` class. Thjis Transformer combines data from specified columns, of mixed datatypes, into a new column containing one string."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidhopkinson26 davidhopkinson26 merged commit 0664167 into azukds:develop Jan 17, 2023
@davidhopkinson26 davidhopkinson26 deleted the feature/JoinToStringTransformer branch January 17, 2023 13:26
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