-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[ENH] Pivot: New widget #3823
[ENH] Pivot: New widget #3823
Conversation
6463cb7
to
97b491a
Compare
Codecov Report
@@ Coverage Diff @@
## master #3823 +/- ##
==========================================
+ Coverage 85.06% 85.22% +0.16%
==========================================
Files 374 376 +2
Lines 69148 70112 +964
==========================================
+ Hits 58821 59755 +934
- Misses 10327 10357 +30 |
7417e69
to
c441019
Compare
def __reference_aggregations(self, var_indep_funs, var_dep_funs): | ||
self._indepen_agg_done = {} | ||
self._depen_agg_done = defaultdict(dict) | ||
i = 1 - int(bool(self.single_var_grouping)) |
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.
bool
is derived from int
, there's no need to cast to int
.
def __get_group_table(self, var, var_indep_funs, var_dep_funs, attrs): | ||
if var is self._total_var: | ||
group_tab = self._group_tables.total | ||
offset = int(bool(not self.single_var_grouping)) |
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 wouldn't cast this, neither.
(~np.isnan(self._col_var_col)))[0]] | ||
elif var is self._row_var or self.single_var_grouping: | ||
group_tab = self._group_tables.total_v | ||
offset = int(bool(not self.single_var_grouping)) |
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 can skip int(bool(...))
. Operator not
already gives a bool
which is a subclass of int
.
Issue
Add pivot widget.
Implements #2860
Description of changes
Includes