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 6f5df65 commit 76cce15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 10 additions & 2 deletions SAC DataFrame/sacdataframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,20 @@ var getScriptPromisify = (src) => {
// Methods

// DataFrame creation
newDataFrame(data, options) {
newDataFrame(data, options, is_series) {

var df = null;

if(this.dfd != null) {
df = new this.dfd.DataFrame(data, options);

if(!isSeries) {
df = new this.dfd.DataFrame(data, options);
}
else {
var data_arr = new Array();
data_arr[0] = data;
df = new this.dfd.DataFrame(data_arr, options);
}
}

return df;
Expand Down
5 changes: 3 additions & 2 deletions SAC DataFrame/sacdataframe.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"vendor": "SAP",
"license": "",
"id": "com.sap.sample.sacdataframe",
"version": "0.9.2",
"version": "0.9.3",
"name": "JavaScript DataFrame for SAC",
"newInstancePrefix": "SACDataFrame",
"description": "A widget that provides DataFrame-like functions",
Expand All @@ -30,7 +30,8 @@
"returnType": "Selection",
"description": "Create a new DataFrame with data and specified options",
"parameters": [ {"name": "data", "type": "Selection[]", "description": "JSON data to set"},
{"name": "options", "type": "Selection", "description": "JSON options to set"} ]
{"name": "options", "type": "Selection", "description": "JSON options to set"},
{"name": "is_series", "type": "boolean", "description": "data provided as a series"} ]
},
"print": {
"description": "Pretty prints default (10) number of rows in a DataFrame to the console",
Expand Down

0 comments on commit 76cce15

Please sign in to comment.