-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
952970e
commit 9fd91f6
Showing
8 changed files
with
327 additions
and
78 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from persist_ext.internals.data.idfy import ID_COLUMN | ||
from persist_ext.internals.widgets.vegalite_chart.selection import ( | ||
SELECTED_COLUMN_BRUSH, | ||
SELECTED_COLUMN_INTENT, | ||
) | ||
|
||
|
||
def process_generate_dataset(df, keep_selection_columns=False, keep_id_col=False): | ||
df = df.copy(deep=True) | ||
|
||
cols_to_remove = [] | ||
|
||
if not keep_id_col: | ||
cols_to_remove.append(ID_COLUMN) | ||
|
||
if not keep_selection_columns: | ||
cols_to_remove.append(SELECTED_COLUMN_BRUSH) | ||
cols_to_remove.append(SELECTED_COLUMN_INTENT) | ||
|
||
df.drop(columns=cols_to_remove, inplace=True) | ||
|
||
return df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters