-
Notifications
You must be signed in to change notification settings - Fork 162
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
update categorical profiler #1136
update categorical profiler #1136
Conversation
@@ -678,6 +681,9 @@ def update(self, df_series: Series) -> CategoricalColumn: | |||
:return: updated CategoricalColumn | |||
:rtype: CategoricalColumn | |||
""" | |||
# TODO remove onces profiler builder is updated | |||
if type(df_series) == pd.Series: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if type(df_series) == pd.Series: | |
if isinstance(df_series, pd.Series): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll want to validate but this is a bit cleaner
maxDiff = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def remove
@@ -883,7 +888,8 @@ def test_json_encode(self): | |||
self.assertEqual(serialized, expected) | |||
|
|||
def test_json_encode_after_update(self): | |||
df_categorical = pd.Series( | |||
df_categorical = pl.Series( | |||
None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why None
outside []
?
Head branch was pushed to by a user without write access
value_counts = df_series.value_counts(sort=True) | ||
category_count: dict = dict(value_counts.iter_rows()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value_counts = df_series.value_counts(sort=True) | |
category_count: dict = dict(value_counts.iter_rows()) | |
category_count: dict = dict(df_series.value_counts(sort=True).iter_rows()) |
why not 1 line? Does this not run?
Head branch was pushed to by a user without write access
No description provided.