W3cubDocs

/pandas 0.25

pandas.Series.to_sparse

Series.to_sparse(self, kind='block', fill_value=None) [source]

Convert Series to SparseSeries.

Deprecated since version 0.25.0.

Parameters:
kind : {‘block’, ‘integer’}, default ‘block’
fill_value : float, defaults to NaN (missing)

Value to use for filling NaN values.

Returns:
SparseSeries

Sparse representation of the Series.

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Series.to_sparse.html