class_docstr: DataFrame accessor for sparse data.
class_docstr_tok: ["DataFrame","accessor","for","sparse","data","."]
docstr: Ratio of non-sparse points to total (dense) data points.
docstr_tok: ["Ratio","of","non-sparse","points","to","total","(","dense",")","data","points","."]
code: def density(self) -> float:
      """
      Ratio of non-sparse points to total (dense) data points.
      """
      tmp = np.mean(
          [column.array.density for _, column in self._parent.items()]
      )
      return tmp
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import numpy
  from pandas.compat._optional import import_optional_dependency
  from pandas.core.dtypes.cast import find_common_type
  from pandas.core.accessor import PandasDelegate, delegate_names
  from pandas.core.arrays.sparse.array import SparseArray
  from pandas.core.arrays.sparse.dtype import SparseDtype
label_desc: Use image node_id 5 for calling the SparseFrameAccessor obj's underlying member method code with example usage: obj.density() and returns: tmp