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

[ENH] Pivot: New widget #3823

Merged
merged 1 commit into from
May 31, 2019
Merged

[ENH] Pivot: New widget #3823

merged 1 commit into from
May 31, 2019

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented May 28, 2019

Issue

Add pivot widget.
Implements #2860

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@VesnaT VesnaT changed the title Pivot: New widget [ENH] Pivot: New widget May 28, 2019
@VesnaT VesnaT force-pushed the owpivot branch 3 times, most recently from 6463cb7 to 97b491a Compare May 28, 2019 12:24
@codecov
Copy link

codecov bot commented May 28, 2019

Codecov Report

Merging #3823 into master will increase coverage by 0.16%.
The diff coverage is 96.78%.

@@            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

@VesnaT VesnaT changed the title [ENH] Pivot: New widget [WIP][ENH] Pivot: New widget May 28, 2019
@ajdapretnar ajdapretnar mentioned this pull request May 28, 2019
3 tasks
@VesnaT VesnaT force-pushed the owpivot branch 2 times, most recently from 7417e69 to c441019 Compare May 29, 2019 07:18
@VesnaT VesnaT changed the title [WIP][ENH] Pivot: New widget [ENH] Pivot: New widget May 29, 2019
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))
Copy link
Contributor

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))
Copy link
Contributor

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))
Copy link
Contributor

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.

@janezd janezd removed their assignment May 31, 2019
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.

3 participants