SparseDataFrame.to_coo()

pandas.SparseDataFrame.to_coo

SparseDataFrame.to_coo() [source]

Return the contents of the frame as a sparse SciPy COO matrix.

New in version 0.20.0.

Returns:

coo_matrix : scipy.sparse.spmatrix

If the caller is heterogeneous and contains booleans or objects, the result will be of dtype=object. See Notes.

登录查看完整内容