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

Black Reformatting #348

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions lux/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,7 @@ def _infer_structure(self):
self.pre_aggregated = (is_multi_index_flag or not_int_index_flag) and small_df_flag
if "Number of Records" in self.columns:
self.pre_aggregated = True
self.pre_aggregated = (
"groupby" in [event.name for event in self.history]
and not is_sql_tbl
)
self.pre_aggregated = "groupby" in [event.name for event in self.history] and not is_sql_tbl

@property
def intent(self):
Expand Down Expand Up @@ -398,11 +395,9 @@ def maintain_recs(self, is_series="DataFrame"):
if rec_df.columns.name is not None:
rec_df._append_rec(rec_infolist, row_group(rec_df))
rec_df._append_rec(rec_infolist, column_group(rec_df))
elif not (
len(rec_df) < 5
and not rec_df.pre_aggregated
and not is_sql_tbl
) and not (self.index.nlevels >= 2 or self.columns.nlevels >= 2):
elif not (len(rec_df) < 5 and not rec_df.pre_aggregated and not is_sql_tbl) and not (
self.index.nlevels >= 2 or self.columns.nlevels >= 2
):
from lux.action.custom import custom_actions

# generate vis from globally registered actions and append to dataframe
Expand Down