Series API
One-dimensional labeled array.
Constructor
new Series(data: DataValue[], options?: SeriesOptions)
Properties
dtype- Get the data type of the Seriesname- Get the name of the Serieslength- Get the number of elementsshape- Get the shape as a tuple [number_of_elements]
Data Access
get(label: Index)- Get value by labeliloc(position: number)- Get value by positionloc(labels: Index[])- Get values by labelsilocRange(positions: number[])- Get values by positions
Basic Operations
head(n?: number)- Return first n elementstail(n?: number)- Return last n elementsunique()- Return unique valuesvalueCounts()- Count value frequenciesnunique(dropna?: boolean)- Count unique valuesisUnique()- Check if all values are unique
Statistical Methods
mean()- Calculate meanstd()- Calculate standard deviationmin()- Find minimum valuemax()- Find maximum valuesum()- Calculate sumcount()- Count non-null values
Data Manipulation
filter(mask: boolean[])- Filter using boolean maskdrop(labels: Index[])- Drop values by labelsrename(name: string)- Rename the seriesisin(values: T[])- Check if values are in listsortValues(ascending?: boolean)- Sort valuessortIndex(ascending?: boolean)- Sort by indexresetIndex()- Reset the index
Data Cleaning
isnull()- Check for null valuesnotnull()- Check for non-null valuesdropna()- Remove null valuesfillna(value: T)- Fill null values
Grouping
groupBy(by?: GroupByKey, options?: GroupByOptions)- Group for aggregation