Skip to content

Commit 52acf16

Browse files
authored
Merge pull request #91 from visualpython/release
Release v1.1.11
2 parents a714ba6 + 2ad3369 commit 52acf16

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+672
-318
lines changed

data/libraries.xml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,11 @@
13811381
<desc>데이터프레임 고유값 조회</desc>
13821382
<file>pandas/getUnique.js</file>
13831383
</item>
1384+
<item id="pdIdt_size" type="function" level="2" name="size" tag="데이터 크기 조회, GET SIZE, SIZE">
1385+
<path>visualpython - pandas - data info - get size</path>
1386+
<desc>판다스 객체 크기 조회</desc>
1387+
<file>pandas/getSize.js</file>
1388+
</item>
13841389
</item>
13851390
<!-- General functions -->
13861391
<item id="pd_generalFunc" type="package" level="1" name="General functions" tag="일반 함수, GENERAL FUNCTIONS">
@@ -1537,37 +1542,42 @@
15371542
<desc>데이터의 합 연산</desc>
15381543
<file>pandas/agg_sum.js</file>
15391544
</item>
1540-
<item id="pdGrp_mean" type="function" level="2" name="mean" tag="집계 연산, 평균, MEAN, MEAN">
1545+
<item id="pdGrp_mean" type="function" level="2" name="mean" tag="집계 연산, 평균, MEAN">
15411546
<path>visualpython - pandas - groupby - mean</path>
15421547
<desc>데이터의 평균값</desc>
15431548
<file>pandas/agg_mean.js</file>
15441549
</item>
1545-
<item id="pdGrp_count" type="function" level="2" name="count" tag="집계 연산, 개수, COUNT, COUNT">
1550+
<item id="pdGrp_count" type="function" level="2" name="count" tag="집계 연산, 개수, COUNT">
15461551
<path>visualpython - pandas - groupby - count</path>
15471552
<desc>데이터 개수</desc>
15481553
<file>pandas/agg_count.js</file>
15491554
</item>
1550-
<item id="pdGrp_max" type="function" level="2" name="max" tag="집계 연산, 최댓값, MAX, MAX">
1555+
<item id="pdGrp_max" type="function" level="2" name="max" tag="집계 연산, 최댓값, MAX">
15511556
<path>visualpython - pandas - groupby - max</path>
15521557
<desc>데이터의 최댓값</desc>
15531558
<file>pandas/agg_max.js</file>
15541559
</item>
1555-
<item id="pdGrp_min" type="function" level="2" name="min" tag="집계 연산, 최솟값, MIN, MIN">
1560+
<item id="pdGrp_min" type="function" level="2" name="min" tag="집계 연산, 최솟값, MIN">
15561561
<path>visualpython - pandas - groupby - min</path>
15571562
<desc>데이터의 최솟값</desc>
15581563
<file>pandas/agg_min.js</file>
15591564
</item>
1560-
<item id="pdGrp_median" type="function" level="2" name="median" tag="집계 연산, 중앙값, MEDIAN, MEDIAN">
1565+
<item id="pdGrp_median" type="function" level="2" name="median" tag="집계 연산, 중앙값, MEDIAN">
15611566
<path>visualpython - pandas - groupby - median</path>
15621567
<desc>데이터의 중앙값</desc>
15631568
<file>pandas/agg_median.js</file>
15641569
</item>
1565-
<item id="pdGrp_std" type="function" level="2" name="std" tag="집계 연산, 표준 편차, STD, STANDARD DEVIATION, STD">
1570+
<item id="pdGrp_std" type="function" level="2" name="std" tag="집계 연산, 표준 편차, STD, STANDARD DEVIATION">
15661571
<path>visualpython - pandas - groupby - std</path>
15671572
<desc>데이터의 표준편차</desc>
15681573
<file>pandas/agg_std.js</file>
15691574
</item>
1570-
<item id="pdGrp_quantile" type="function" level="2" name="quantile" tag="집계 연산, 백분위 수, QUANTILE, QUANTILE">
1575+
<item id="pdGrp_size" type="function" level="2" name="size" tag="집계 연산, 개수, SIZE">
1576+
<path>visualpython - pandas - groupby - size</path>
1577+
<desc>데이터의 크기/개수</desc>
1578+
<file>pandas/agg_size.js</file>
1579+
</item>
1580+
<item id="pdGrp_quantile" type="function" level="2" name="quantile" tag="집계 연산, 백분위 수, QUANTILE">
15711581
<path>visualpython - pandas - groupby - quantile</path>
15721582
<desc>데이터의 백분위 수</desc>
15731583
<file>pandas/agg_quantile.js</file>

src/api_block/blockContainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2649,7 +2649,7 @@ define([
26492649
this.hideOptionPreviewBox();
26502650
$(VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_PREVIEW_BUTTON).removeClass('enabled');
26512651

2652-
this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.10');
2652+
this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.11');
26532653
this.setFocusedPageType(FOCUSED_PAGE_TYPE.BOARD);
26542654
$('.vp-apiblock-option-tab-none').css(STR_DISPLAY, STR_BLOCK);
26552655
}

src/api_block/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
id='vp_apiblock_option_page'>
176176
<div class="vp-apiblock-option-navigator">
177177
<div class="vp-apiblock-option-navigator-label">
178-
<span class="vp-orange-text">Visual Python 1.1.10</span>
178+
<span class="vp-orange-text">Visual Python 1.1.11</span>
179179
</div>
180180
<div class="vp-apiblock-option-new-to-save" title="something modified...">
181181

src/common/component/vpTableLayoutVerticalSimple.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ define([
6262
* @param {number} lineIndex 추가될 라인 index (미지정시 마지막 라인에 추가)
6363
*/
6464
vpTableLayoutVerticalSimple.prototype.addReqRow = function(caption = "", content = "", lineIndex) {
65-
var rowString = vpCommon.formatString("<tr><th class='{0}'>{1}</th><td>{2}</td></tr>", vpConst.COLOR_FONT_ORANGE, caption, content);
65+
var rowString = vpCommon.formatString('<tr><th class="{0}">{1}</th><td>{2}</td></tr>', vpConst.COLOR_FONT_ORANGE, caption, content);
6666
if (lineIndex === undefined) {
6767
this._tbodyContent.push(rowString);
6868
} else if (typeof lineIndex == "number") {

src/common/constant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define ([
4848
* toolbar btn properties
4949
*/
5050
const TOOLBAR_BTN_INFO = {
51-
HELP: "Visual Python 1.1.10"
51+
HELP: "Visual Python 1.1.11"
5252
// , ICON: "fa-angellist"
5353
, ICON: "vp-main-icon"
5454
, ID: "vpBtnToggle"

src/common/vpPopupPage.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,20 +178,20 @@ define([
178178
}
179179

180180
PopupPage.prototype.openPreview = function() {
181+
$(this.wrapSelector('.' + VP_PP_PREVIEW_BOX)).show();
182+
181183
if (this.pageThis) {
182184
var code = this.pageThis.generateCode(false, false);
183185
this.cmpreview.setValue(code);
184186
this.cmpreview.save();
185-
this.cmpreview.focus();
186-
187+
187188
var that = this;
188189
setTimeout(function() {
189190
that.cmpreview.refresh();
190-
},1);
191-
192-
this.previewOpened = true;
193-
$(this.wrapSelector('.' + VP_PP_PREVIEW_BOX)).show();
191+
}, 1);
194192
}
193+
194+
this.previewOpened = true;
195195
}
196196

197197
PopupPage.prototype.closePreview = function() {
@@ -213,7 +213,7 @@ define([
213213

214214
// click preview
215215
$(document).on('click', this.wrapSelector('.' + VP_PP_BUTTON_PREVIEW), function(evt) {
216-
// evt.stopPropagation();
216+
evt.stopPropagation();
217217
if (that.previewOpened) {
218218
that.closePreview();
219219
} else {

src/common/vpProfiling.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,11 @@ define([
253253
if (!checking) {
254254
return;
255255
}
256-
if (msg.content['name'] == 'stderr') {
257-
if (msg.content['text'].includes('not found')) {
258-
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Install');
259-
// set enabled
260-
if ($(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).hasClass('disabled')) {
261-
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).removeClass('disabled');
262-
}
256+
if (msg.content['name'] == 'stderr' || msg.content['text'].includes('not found')) {
257+
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Install');
258+
// set enabled
259+
if ($(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).hasClass('disabled')) {
260+
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).removeClass('disabled');
263261
}
264262
} else {
265263
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Installed');
@@ -351,7 +349,7 @@ define([
351349
});
352350

353351
// click install
354-
$(document).on('click', this.wrapSelector('.' + VP_PF_INSTALL_BTN), function(event) {
352+
$(document).on('click', this.wrapSelector('.' + VP_PF_INSTALL_BTN + ':not(.disabled)'), function(event) {
355353
vpCommon.cellExecute([{command: '!pip install pandas-profiling', exec:true, type:'code'}]);
356354
});
357355

src/common/vpSubsetEditor.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,11 +2280,9 @@ define([
22802280

22812281
// display
22822282
if (this.useCell) {
2283-
code.appendLine();
22842283
if (allocation && this.state.allocateTo != '') {
2284+
code.appendLine();
22852285
code.append(this.state.allocateTo);
2286-
} else {
2287-
code.append(this.state.pandasObject);
22882286
}
22892287
}
22902288
return code.toString();

src/file_io/fileio.html

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,12 @@
11
<div class="vp-option-page" id="vp_fileioPage">
22
<select id="vp_fileioType" class="vp-fileio-type">
3-
<option value="Sample">Sample File</option>
43
<option value="Read">Read File</option>
54
<option value="Write">Write File</option>
5+
<option value="Sample">Sample File</option>
66
</select>
77
<input id="vp_pageDom" type="hidden"/>
88
<div class="vp-fileio-body">
9-
<div id="vp_fileSample" class="vp-fileio-box">
10-
<table class="vp-option-table">
11-
<thead>
12-
<colgroup><col width="30%"><col width="*"></colgroup>
13-
</thead>
14-
<tbody>
15-
<tr>
16-
<td><label for="vp_sampleFile" class="vp-orange-text">Sample File</label></td>
17-
<td>
18-
<select class="vp-select option-select" id="vp_sampleFile">
19-
<option name="vp_sampleFile" value="iris.csv">iris</option>
20-
<option name="vp_sampleFile" value="Titanic_train.csv">Titanic_train</option>
21-
<option name="vp_sampleFile" value="Titanic_test.csv">Titanic_test</option>
22-
<option name="vp_sampleFile" value="cancer.csv">cancer</option>
23-
<option name="vp_sampleFile" value="fish.csv">fish</option>
24-
<option name="vp_sampleFile" value="accidentData.csv">accidentData</option>
25-
<option name="vp_sampleFile" value="campusRecruitment.csv">campusRecruitment</option>
26-
<option name="vp_sampleFile" value="houseData_500.csv">houseData_500</option>
27-
<option name="vp_sampleFile" value="lolRankedData_500.csv">lolRankedData_500</option>
28-
<option name="vp_sampleFile" value="weatherData_500.csv">weatherData_500</option>
29-
<option name="vp_sampleFile" value="welfareCenter.csv">welfareCenter</option>
30-
<option name="vp_sampleFile" value="mnist_train_1000.csv">mnist_train_1000</option>
31-
</select>
32-
</td>
33-
</tr>
34-
<tr>
35-
<td><label for="vp_sampleReturn" class="vp-orange-text">Return to</label></td>
36-
<td><input type="text" class="vp-input input-single" id="vp_sampleReturn" placeholder="" value="" title=""></td>
37-
</tr>
38-
</tbody>
39-
</table>
40-
</div>
41-
<div id="vp_fileRead" class="vp-fileio-box" style="display:none;">
9+
<div id="vp_fileRead" class="vp-fileio-box">
4210
<form id="vp_optionForm">
4311

4412
<div class="vp-accordion-container vp-accordion-open">
@@ -84,6 +52,38 @@
8452

8553
</form>
8654
</div>
55+
<div id="vp_fileSample" class="vp-fileio-box" style="display:none;">
56+
<table class="vp-option-table">
57+
<thead>
58+
<colgroup><col width="30%"><col width="*"></colgroup>
59+
</thead>
60+
<tbody>
61+
<tr>
62+
<td><label for="vp_sampleFile" class="vp-orange-text">Sample File</label></td>
63+
<td>
64+
<select class="vp-select option-select" id="vp_sampleFile">
65+
<option name="vp_sampleFile" value="iris.csv">iris</option>
66+
<option name="vp_sampleFile" value="Titanic_train.csv">Titanic_train</option>
67+
<option name="vp_sampleFile" value="Titanic_test.csv">Titanic_test</option>
68+
<option name="vp_sampleFile" value="cancer.csv">cancer</option>
69+
<option name="vp_sampleFile" value="fish.csv">fish</option>
70+
<option name="vp_sampleFile" value="accidentData.csv">accidentData</option>
71+
<option name="vp_sampleFile" value="campusRecruitment.csv">campusRecruitment</option>
72+
<option name="vp_sampleFile" value="houseData_500.csv">houseData_500</option>
73+
<option name="vp_sampleFile" value="lolRankedData_500.csv">lolRankedData_500</option>
74+
<option name="vp_sampleFile" value="weatherData_500.csv">weatherData_500</option>
75+
<option name="vp_sampleFile" value="welfareCenter.csv">welfareCenter</option>
76+
<option name="vp_sampleFile" value="mnist_train_1000.csv">mnist_train_1000</option>
77+
</select>
78+
</td>
79+
</tr>
80+
<tr>
81+
<td><label for="vp_sampleReturn" class="vp-orange-text">Allocate to</label></td>
82+
<td><input type="text" class="vp-input input-single" id="vp_sampleReturn" placeholder="" value="" title=""></td>
83+
</tr>
84+
</tbody>
85+
</table>
86+
</div>
8787
</div>
8888

8989
</div>

src/file_io/fileio.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,34 @@ define([
8080
}
8181

8282
this.fileState = {
83+
'Read': {
84+
fileTypeId: {
85+
'csv': 'pd004',
86+
'excel': 'pd123',
87+
'json': 'pd076',
88+
'pickle': 'pd079'
89+
},
90+
selectedType: 'csv',
91+
package: null,
92+
fileResultState: {
93+
pathInputId : this.wrapSelector('#vp_fileRead #i0'),
94+
fileInputId : this.wrapSelector('#vp_fileRead #fileName')
95+
}
96+
},
97+
'Write': {
98+
fileTypeId: {
99+
'csv': 'pd005',
100+
'excel': 'pd124',
101+
'json': 'pd077',
102+
'pickle': 'pd078'
103+
},
104+
selectedType: 'csv',
105+
package: null,
106+
fileResultState: {
107+
pathInputId : this.wrapSelector('#vp_fileWrite #i1'),
108+
fileInputId : this.wrapSelector('#vp_fileWrite #fileName')
109+
}
110+
},
83111
'Sample': {
84112
library: 'pandas',
85113
code: "${vp_sampleReturn} = pd.read_csv('" + this.dataPath + "${vp_sampleFile}'${v})",
@@ -106,38 +134,10 @@ define([
106134
{
107135
name:'vp_sampleReturn',
108136
type:'var',
109-
label:'Return to',
137+
label:'Allocate to',
110138
required: true
111139
}
112140
]
113-
},
114-
'Read': {
115-
fileTypeId: {
116-
'csv': 'pd004',
117-
'excel': 'pd123',
118-
'json': 'pd076',
119-
'pickle': 'pd079'
120-
},
121-
selectedType: 'csv',
122-
package: null,
123-
fileResultState: {
124-
pathInputId : this.wrapSelector('#vp_fileRead #i0'),
125-
fileInputId : this.wrapSelector('#vp_fileRead #fileName')
126-
}
127-
},
128-
'Write': {
129-
fileTypeId: {
130-
'csv': 'pd005',
131-
'excel': 'pd124',
132-
'json': 'pd077',
133-
'pickle': 'pd078'
134-
},
135-
selectedType: 'csv',
136-
package: null,
137-
fileResultState: {
138-
pathInputId : this.wrapSelector('#vp_fileWrite #i1'),
139-
fileInputId : this.wrapSelector('#vp_fileWrite #fileName')
140-
}
141141
}
142142
}
143143

0 commit comments

Comments
 (0)