Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
xPAGCOE authored Feb 12, 2024
1 parent 0775874 commit 0562e28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions SAC DataFrame/sacdataframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,16 @@ var getScriptPromisify = (src) => {
}

// query
query(dataframe, condition) {
query(dataframe, mask) {
var df = null;

if(dataframe != null) {

df = this.newDataFrame(dataframe.$data, {columns: dataframe.$columns});
df_mask = this.newDataFrame(mask.$data, {columns: mask.$columns});

if(df != null) {
df = df.query(condition);
if((df != null) && (df_mask != null)) {
df = df.query(df_mask);
}
}

Expand Down Expand Up @@ -727,7 +728,7 @@ var getScriptPromisify = (src) => {
var df = null;

if(dataframe != null) {
df = this.newDataFrame(dataframe.$data, {columns: dataframe.$columns});
df = this.newDataFrame(dataframe.$data, {columns: dataframe.$columns, index: dataframe.$index});

if(df != null) {

Expand All @@ -742,7 +743,7 @@ var getScriptPromisify = (src) => {
}
}

df = df.query(this.newDataFrame(mat_cmp, {columns: dataframe.$columns}));
df = df.query(this.newDataFrame(mat_cmp, {columns: dataframe.$columns, index: dataframe.$index}));
}
}

Expand Down Expand Up @@ -813,10 +814,7 @@ var getScriptPromisify = (src) => {
}
}

var df_cmp = this.newDataFrame(mat_cmp, {columns: dataframe.$columns, index: dataframe.$index});
console.log(df_cmp);

df = df.query(df_cmp);
df = this.newDataFrame(mat_cmp, {columns: dataframe.$columns, index: dataframe.$index});
}
}

Expand Down Expand Up @@ -861,7 +859,7 @@ var getScriptPromisify = (src) => {
}

// Min
max(dataframe, axis) {
min(dataframe, axis) {

var df_min = null;

Expand Down
2 changes: 1 addition & 1 deletion SAC DataFrame/sacdataframe.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"returnType": "Selection",
"description": "Query the DataFrame by the result of a logical comparison or boolean mask",
"parameters": [ {"name": "dataframe", "type": "Selection", "description": "Input DafaFrame"},
{"name": "condition", "type": "Selection", "description": "Boolean condition"} ]
{"name": "mask", "type": "Selection", "description": "Boolean mask condition"} ]
},
"addDataFrame": {
"returnType": "Selection",
Expand Down

0 comments on commit 0562e28

Please sign in to comment.