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
Aggregate data outside of topN into a single category #2176
Conversation
Why i cannot find
|
And i tried to change |
superset/viz.py
Outdated
@@ -223,6 +224,17 @@ def get_df(self, query_obj=None): | |||
df[DTTM_ALIAS] += timedelta(hours=self.datasource.offset) | |||
df.replace([np.inf, -np.inf], np.nan) | |||
df = df.fillna(0) | |||
if (self.others_category is not 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.
you want and not &, also you don't need the \
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.
Nice! Thx a lot.
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.
Oh no, it still need the \
cuz Line too long (83 > 79 characters)
:(
superset/viz.py
Outdated
if (self.others_category is not None) & \ | ||
(self.others_category != 'None'): | ||
top_n = int(self.others_category) | ||
if (top_n > 0) & (len(df) > top_n): |
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.
same here and you can drop the parens
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.
I see.
Il 15/02/2017 14:37, Benedict Jin ha scritto:
And i tried to change |from .base_tests import SupersetTestCase| into |from
tests.base_tests import SupersetTestCase| to import |.base_tests| as a package
correctly. Is this reasonable? @mistercrunch <https://github.com/mistercrunch>
Why? it looks like a perfectly fine import as it is.
|
I know... But i still got the issue:
|
We got rid of I'm confused as to how to handle TopN in Druid. It appears that each node or segment processing returns a local TopN and the coordinator merges the results. In our case on high cardinality TopN queries we've seen much of the long tail making it through and incomplete results for items that actually fit in the real TopN. User may want and expect a few things:
I may take this to the Druid user group and have a conversation there. I feel like I'm missing something. |
You mean this |
Aggregate data outside of topN into a single category
There is a problem that those category icons will fill up the whole chart, when i have tens of thousands metrics need to be display. So we should aggregate those category outside of topN into a single category named
Others Category.