Skip to content

Commit 083f864

Browse files
author
minjk-bl
committed
Apps > Merge - prototype
1 parent 6934c50 commit 083f864

File tree

5 files changed

+604
-68
lines changed

5 files changed

+604
-68
lines changed

css/common/merge.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
.vp-mg-container {
22
width: 700px;
33
height: 550px;
4+
}
5+
6+
.vp-mg-container .vp-pp-body {
7+
overflow: hidden;
8+
}
9+
10+
.vp-mg-df-box {
11+
display: grid;
12+
grid-template-rows: 30px;
13+
grid-row-gap: 5px;
14+
}
15+
16+
.vp-mg-df-refresh {
17+
display: inline-block;
18+
cursor: pointer;
19+
margin-left: 5px;
20+
}
21+
.vp-mg-df-box label {
22+
font-weight: bold;
23+
}
24+
.vp-mg-df-box select,
25+
.vp-mg-df-box input {
26+
width: 160px;
427
}

css/component/common.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
background: #EF6B10;
4747
}
4848
.vp-button.disabled,
49-
.vp-button.disabled:hover {
49+
.vp-button.disabled:hover,
50+
.vp-button:disabled,
51+
.vp-button:disabled:hover {
5052
background: #E5E5E5;
5153
border: 0px;
5254
border: 0.25px solid #E4E4E4;

src/api/functions/pandasCommand.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ def _vp_get_multi_columns_list(dfs = []):
5151
"""
5252
Get Columns List with Detail Information of multiple dataframe
5353
"""
54-
common_set = {}
55-
for df in dfs:
56-
common_set = common_set & set(df)
54+
if len(dfs) <= 0:
55+
return []
56+
57+
common_set = set(dfs[0].columns)
58+
for df in dfs[1:]:
59+
common_set = common_set & set(df.columns)
5760
common_columns = list(common_set)
5861

5962
colList = []

src/common/vpGroupby.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ define([
358358
page.appendLine('<div>');
359359
page.appendFormatLine('<label for="{0}" class="{1}">{2}</label>', 'vp_gbAllocateTo', 'wp80', 'Allocate to');
360360
page.appendFormatLine('<input type="text" id="{0}" placeholder="{1}"/>', 'vp_gbAllocateTo', 'New variable name');
361-
362361
page.appendLine('</div>');
363362

364363
page.appendLine('</div>'); // end of df-box
@@ -663,6 +662,8 @@ define([
663662
$(that._wrapSelector('#vp_gbBy')).val('');
664663
$(that._wrapSelector('#vp_gbDisplay')).val('');
665664
that.state.variable = newVal;
665+
that.state.groupby = [];
666+
that.state.display = [];
666667
}
667668
});
668669

0 commit comments

Comments
 (0)