UNPKG

danfojs

Version:

JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.

55 lines (53 loc) 2.75 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); /** * @license * Copyright 2022 JsData. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================================== */ var series_1 = __importDefault(require("../../../danfojs-base/core/series")); /** * One-dimensional ndarray with axis labels. * The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. * Operations between Series (+, -, /, , *) align values based on their associated index values – they need not be the same length. * @param data 1D Array, JSON, Tensor, Block of data. * @param options.index Array of numeric or string index for subseting array. If not specified, indices are auto generated. * @param options.columns Column name. This is like the name of the Series. If not specified, column name is set to 0. * @param options.dtypes Data types of the Series data. If not specified, dtypes is inferred. * @param options.config General configuration object for extending or setting Series behavior. */ var Series = /** @class */ (function (_super) { __extends(Series, _super); function Series(data, options) { if (options === void 0) { options = {}; } return _super.call(this, data, options) || this; } return Series; }(series_1.default)); exports.default = Series;