@@ -47,6 +47,18 @@ class SparseAccessor(BaseAccessor, PandasDelegate):
4747 """
4848 Accessor for SparseSparse from other sparse matrix data types.
4949
50+ Parameters
51+ ----------
52+ data : Series or DataFrame
53+ The Series or DataFrame to which the SparseAccessor is attached.
54+
55+ See Also
56+ --------
57+ Series.sparse.to_coo : Create a scipy.sparse.coo_matrix from a Series with
58+ MultiIndex.
59+ Series.sparse.from_coo : Create a Series with sparse values from a
60+ scipy.sparse.coo_matrix.
61+
5062 Examples
5163 --------
5264 >>> ser = pd.Series([0, 0, 2, 2, 2], dtype="Sparse[int]")
@@ -135,7 +147,9 @@ def to_coo(
135147 Parameters
136148 ----------
137149 row_levels : tuple/list
150+ MultiIndex levels to use for row coordinates, specified by name or index.
138151 column_levels : tuple/list
152+ MultiIndex levels to use for column coordinates, specified by name or index.
139153 sort_labels : bool, default False
140154 Sort the row and column labels before forming the sparse matrix.
141155 When `row_levels` and/or `column_levels` refer to a single level,
@@ -144,8 +158,16 @@ def to_coo(
144158 Returns
145159 -------
146160 y : scipy.sparse.coo_matrix
161+ The sparse matrix in coordinate format.
147162 rows : list (row labels)
163+ Labels corresponding to the row coordinates.
148164 columns : list (column labels)
165+ Labels corresponding to the column coordinates.
166+
167+ See Also
168+ --------
169+ Series.sparse.from_coo : Create a Series with sparse values from a
170+ scipy.sparse.coo_matrix.
149171
150172 Examples
151173 --------
0 commit comments