Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 17 additions & 7 deletions data/libraries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,11 @@
<desc>데이터프레임 고유값 조회</desc>
<file>pandas/getUnique.js</file>
</item>
<item id="pdIdt_size" type="function" level="2" name="size" tag="데이터 크기 조회, GET SIZE, SIZE">
<path>visualpython - pandas - data info - get size</path>
<desc>판다스 객체 크기 조회</desc>
<file>pandas/getSize.js</file>
</item>
</item>
<!-- General functions -->
<item id="pd_generalFunc" type="package" level="1" name="General functions" tag="일반 함수, GENERAL FUNCTIONS">
Expand Down Expand Up @@ -1537,37 +1542,42 @@
<desc>데이터의 합 연산</desc>
<file>pandas/agg_sum.js</file>
</item>
<item id="pdGrp_mean" type="function" level="2" name="mean" tag="집계 연산, 평균, MEAN, MEAN">
<item id="pdGrp_mean" type="function" level="2" name="mean" tag="집계 연산, 평균, MEAN">
<path>visualpython - pandas - groupby - mean</path>
<desc>데이터의 평균값</desc>
<file>pandas/agg_mean.js</file>
</item>
<item id="pdGrp_count" type="function" level="2" name="count" tag="집계 연산, 개수, COUNT, COUNT">
<item id="pdGrp_count" type="function" level="2" name="count" tag="집계 연산, 개수, COUNT">
<path>visualpython - pandas - groupby - count</path>
<desc>데이터 개수</desc>
<file>pandas/agg_count.js</file>
</item>
<item id="pdGrp_max" type="function" level="2" name="max" tag="집계 연산, 최댓값, MAX, MAX">
<item id="pdGrp_max" type="function" level="2" name="max" tag="집계 연산, 최댓값, MAX">
<path>visualpython - pandas - groupby - max</path>
<desc>데이터의 최댓값</desc>
<file>pandas/agg_max.js</file>
</item>
<item id="pdGrp_min" type="function" level="2" name="min" tag="집계 연산, 최솟값, MIN, MIN">
<item id="pdGrp_min" type="function" level="2" name="min" tag="집계 연산, 최솟값, MIN">
<path>visualpython - pandas - groupby - min</path>
<desc>데이터의 최솟값</desc>
<file>pandas/agg_min.js</file>
</item>
<item id="pdGrp_median" type="function" level="2" name="median" tag="집계 연산, 중앙값, MEDIAN, MEDIAN">
<item id="pdGrp_median" type="function" level="2" name="median" tag="집계 연산, 중앙값, MEDIAN">
<path>visualpython - pandas - groupby - median</path>
<desc>데이터의 중앙값</desc>
<file>pandas/agg_median.js</file>
</item>
<item id="pdGrp_std" type="function" level="2" name="std" tag="집계 연산, 표준 편차, STD, STANDARD DEVIATION, STD">
<item id="pdGrp_std" type="function" level="2" name="std" tag="집계 연산, 표준 편차, STD, STANDARD DEVIATION">
<path>visualpython - pandas - groupby - std</path>
<desc>데이터의 표준편차</desc>
<file>pandas/agg_std.js</file>
</item>
<item id="pdGrp_quantile" type="function" level="2" name="quantile" tag="집계 연산, 백분위 수, QUANTILE, QUANTILE">
<item id="pdGrp_size" type="function" level="2" name="size" tag="집계 연산, 개수, SIZE">
<path>visualpython - pandas - groupby - size</path>
<desc>데이터의 크기/개수</desc>
<file>pandas/agg_size.js</file>
</item>
<item id="pdGrp_quantile" type="function" level="2" name="quantile" tag="집계 연산, 백분위 수, QUANTILE">
<path>visualpython - pandas - groupby - quantile</path>
<desc>데이터의 백분위 수</desc>
<file>pandas/agg_quantile.js</file>
Expand Down
2 changes: 1 addition & 1 deletion src/api_block/blockContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2649,7 +2649,7 @@ define([
this.hideOptionPreviewBox();
$(VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_PREVIEW_BUTTON).removeClass('enabled');

this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.10');
this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.11');
this.setFocusedPageType(FOCUSED_PAGE_TYPE.BOARD);
$('.vp-apiblock-option-tab-none').css(STR_DISPLAY, STR_BLOCK);
}
Expand Down
2 changes: 1 addition & 1 deletion src/api_block/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
id='vp_apiblock_option_page'>
<div class="vp-apiblock-option-navigator">
<div class="vp-apiblock-option-navigator-label">
<span class="vp-orange-text">Visual Python 1.1.10</span>
<span class="vp-orange-text">Visual Python 1.1.11</span>
</div>
<div class="vp-apiblock-option-new-to-save" title="something modified...">

Expand Down
2 changes: 1 addition & 1 deletion src/common/component/vpTableLayoutVerticalSimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define([
* @param {number} lineIndex 추가될 라인 index (미지정시 마지막 라인에 추가)
*/
vpTableLayoutVerticalSimple.prototype.addReqRow = function(caption = "", content = "", lineIndex) {
var rowString = vpCommon.formatString("<tr><th class='{0}'>{1}</th><td>{2}</td></tr>", vpConst.COLOR_FONT_ORANGE, caption, content);
var rowString = vpCommon.formatString('<tr><th class="{0}">{1}</th><td>{2}</td></tr>', vpConst.COLOR_FONT_ORANGE, caption, content);
if (lineIndex === undefined) {
this._tbodyContent.push(rowString);
} else if (typeof lineIndex == "number") {
Expand Down
2 changes: 1 addition & 1 deletion src/common/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ define ([
* toolbar btn properties
*/
const TOOLBAR_BTN_INFO = {
HELP: "Visual Python 1.1.10"
HELP: "Visual Python 1.1.11"
// , ICON: "fa-angellist"
, ICON: "vp-main-icon"
, ID: "vpBtnToggle"
Expand Down
14 changes: 7 additions & 7 deletions src/common/vpPopupPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,20 @@ define([
}

PopupPage.prototype.openPreview = function() {
$(this.wrapSelector('.' + VP_PP_PREVIEW_BOX)).show();

if (this.pageThis) {
var code = this.pageThis.generateCode(false, false);
this.cmpreview.setValue(code);
this.cmpreview.save();
this.cmpreview.focus();


var that = this;
setTimeout(function() {
that.cmpreview.refresh();
},1);

this.previewOpened = true;
$(this.wrapSelector('.' + VP_PP_PREVIEW_BOX)).show();
}, 1);
}

this.previewOpened = true;
}

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

// click preview
$(document).on('click', this.wrapSelector('.' + VP_PP_BUTTON_PREVIEW), function(evt) {
// evt.stopPropagation();
evt.stopPropagation();
if (that.previewOpened) {
that.closePreview();
} else {
Expand Down
14 changes: 6 additions & 8 deletions src/common/vpProfiling.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,11 @@ define([
if (!checking) {
return;
}
if (msg.content['name'] == 'stderr') {
if (msg.content['text'].includes('not found')) {
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Install');
// set enabled
if ($(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).hasClass('disabled')) {
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).removeClass('disabled');
}
if (msg.content['name'] == 'stderr' || msg.content['text'].includes('not found')) {
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Install');
// set enabled
if ($(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).hasClass('disabled')) {
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).removeClass('disabled');
}
} else {
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Installed');
Expand Down Expand Up @@ -351,7 +349,7 @@ define([
});

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

Expand Down
4 changes: 1 addition & 3 deletions src/common/vpSubsetEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2280,11 +2280,9 @@ define([

// display
if (this.useCell) {
code.appendLine();
if (allocation && this.state.allocateTo != '') {
code.appendLine();
code.append(this.state.allocateTo);
} else {
code.append(this.state.pandasObject);
}
}
return code.toString();
Expand Down
68 changes: 34 additions & 34 deletions src/file_io/fileio.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,12 @@
<div class="vp-option-page" id="vp_fileioPage">
<select id="vp_fileioType" class="vp-fileio-type">
<option value="Sample">Sample File</option>
<option value="Read">Read File</option>
<option value="Write">Write File</option>
<option value="Sample">Sample File</option>
</select>
<input id="vp_pageDom" type="hidden"/>
<div class="vp-fileio-body">
<div id="vp_fileSample" class="vp-fileio-box">
<table class="vp-option-table">
<thead>
<colgroup><col width="30%"><col width="*"></colgroup>
</thead>
<tbody>
<tr>
<td><label for="vp_sampleFile" class="vp-orange-text">Sample File</label></td>
<td>
<select class="vp-select option-select" id="vp_sampleFile">
<option name="vp_sampleFile" value="iris.csv">iris</option>
<option name="vp_sampleFile" value="Titanic_train.csv">Titanic_train</option>
<option name="vp_sampleFile" value="Titanic_test.csv">Titanic_test</option>
<option name="vp_sampleFile" value="cancer.csv">cancer</option>
<option name="vp_sampleFile" value="fish.csv">fish</option>
<option name="vp_sampleFile" value="accidentData.csv">accidentData</option>
<option name="vp_sampleFile" value="campusRecruitment.csv">campusRecruitment</option>
<option name="vp_sampleFile" value="houseData_500.csv">houseData_500</option>
<option name="vp_sampleFile" value="lolRankedData_500.csv">lolRankedData_500</option>
<option name="vp_sampleFile" value="weatherData_500.csv">weatherData_500</option>
<option name="vp_sampleFile" value="welfareCenter.csv">welfareCenter</option>
<option name="vp_sampleFile" value="mnist_train_1000.csv">mnist_train_1000</option>
</select>
</td>
</tr>
<tr>
<td><label for="vp_sampleReturn" class="vp-orange-text">Return to</label></td>
<td><input type="text" class="vp-input input-single" id="vp_sampleReturn" placeholder="" value="" title=""></td>
</tr>
</tbody>
</table>
</div>
<div id="vp_fileRead" class="vp-fileio-box" style="display:none;">
<div id="vp_fileRead" class="vp-fileio-box">
<form id="vp_optionForm">

<div class="vp-accordion-container vp-accordion-open">
Expand Down Expand Up @@ -84,6 +52,38 @@

</form>
</div>
<div id="vp_fileSample" class="vp-fileio-box" style="display:none;">
<table class="vp-option-table">
<thead>
<colgroup><col width="30%"><col width="*"></colgroup>
</thead>
<tbody>
<tr>
<td><label for="vp_sampleFile" class="vp-orange-text">Sample File</label></td>
<td>
<select class="vp-select option-select" id="vp_sampleFile">
<option name="vp_sampleFile" value="iris.csv">iris</option>
<option name="vp_sampleFile" value="Titanic_train.csv">Titanic_train</option>
<option name="vp_sampleFile" value="Titanic_test.csv">Titanic_test</option>
<option name="vp_sampleFile" value="cancer.csv">cancer</option>
<option name="vp_sampleFile" value="fish.csv">fish</option>
<option name="vp_sampleFile" value="accidentData.csv">accidentData</option>
<option name="vp_sampleFile" value="campusRecruitment.csv">campusRecruitment</option>
<option name="vp_sampleFile" value="houseData_500.csv">houseData_500</option>
<option name="vp_sampleFile" value="lolRankedData_500.csv">lolRankedData_500</option>
<option name="vp_sampleFile" value="weatherData_500.csv">weatherData_500</option>
<option name="vp_sampleFile" value="welfareCenter.csv">welfareCenter</option>
<option name="vp_sampleFile" value="mnist_train_1000.csv">mnist_train_1000</option>
</select>
</td>
</tr>
<tr>
<td><label for="vp_sampleReturn" class="vp-orange-text">Allocate to</label></td>
<td><input type="text" class="vp-input input-single" id="vp_sampleReturn" placeholder="" value="" title=""></td>
</tr>
</tbody>
</table>
</div>
</div>

</div>
58 changes: 29 additions & 29 deletions src/file_io/fileio.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,34 @@ define([
}

this.fileState = {
'Read': {
fileTypeId: {
'csv': 'pd004',
'excel': 'pd123',
'json': 'pd076',
'pickle': 'pd079'
},
selectedType: 'csv',
package: null,
fileResultState: {
pathInputId : this.wrapSelector('#vp_fileRead #i0'),
fileInputId : this.wrapSelector('#vp_fileRead #fileName')
}
},
'Write': {
fileTypeId: {
'csv': 'pd005',
'excel': 'pd124',
'json': 'pd077',
'pickle': 'pd078'
},
selectedType: 'csv',
package: null,
fileResultState: {
pathInputId : this.wrapSelector('#vp_fileWrite #i1'),
fileInputId : this.wrapSelector('#vp_fileWrite #fileName')
}
},
'Sample': {
library: 'pandas',
code: "${vp_sampleReturn} = pd.read_csv('" + this.dataPath + "${vp_sampleFile}'${v})",
Expand All @@ -106,38 +134,10 @@ define([
{
name:'vp_sampleReturn',
type:'var',
label:'Return to',
label:'Allocate to',
required: true
}
]
},
'Read': {
fileTypeId: {
'csv': 'pd004',
'excel': 'pd123',
'json': 'pd076',
'pickle': 'pd079'
},
selectedType: 'csv',
package: null,
fileResultState: {
pathInputId : this.wrapSelector('#vp_fileRead #i0'),
fileInputId : this.wrapSelector('#vp_fileRead #fileName')
}
},
'Write': {
fileTypeId: {
'csv': 'pd005',
'excel': 'pd124',
'json': 'pd077',
'pickle': 'pd078'
},
selectedType: 'csv',
package: null,
fileResultState: {
pathInputId : this.wrapSelector('#vp_fileWrite #i1'),
fileInputId : this.wrapSelector('#vp_fileWrite #fileName')
}
}
}

Expand Down
Loading