Pandas Series: sparse.npoints() function
Series-sparse.npoints() function
The number of non- fill_value points.
Syntax:
Series.sparse.npoints
Example:
Python-Pandas Code:
import numpy as np
import pandas as pd
s = pd.SparseArray([1, 0, 2, 1, 1], fill_value=0)
s.npoints
Output:
4
PREV : Series-to_latex() function
NEXT : Series-sparse.density() function
