-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Closed
Copy link
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateSparseSparse Data TypeSparse Data Typegood first issue
Milestone
Description
DataFrame.sparse.to_coo()
should raise when the fill_value
is not zero, since scipy.sparse
only supports filling with 0.
In [21]: df = pd.DataFrame({"A": pd.SparseArray([1, 1, 1, 2], fill_value=1)})
In [22]: df.sparse.to_coo().todense()
Out[22]:
matrix([[0],
[0],
[0],
[2]])
That's incorrect. It should instead raise a ValueError
with a nice message.
Metadata
Metadata
Assignees
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateSparseSparse Data TypeSparse Data Typegood first issue