pandas 1.4.2

NotesParametersReturns
fillna(self: 'SparseArrayT', value=None, method: 'FillnaOptions | None' = None, limit: 'int | None' = None) -> 'SparseArrayT'

Notes

When :None:None:`value` is specified, the result's fill_value depends on self.fill_value . The goal is to maintain low-memory use.

If self.fill_value is NA, the result dtype will be SparseDtype(self.dtype, fill_value=value) . This will preserve amount of memory used before and after filling.

When self.fill_value is not NA, the result dtype will be self.dtype . Again, this preserves the amount of memory used.

Parameters

value : scalar, optional
method : str, optional
warning

Using 'method' will result in high memory use, as all :None:None:`fill_value` methods will be converted to an in-memory ndarray

limit : int, optional

Returns

SparseArray

Fill missing values with :None:None:`value`.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/arrays/sparse/array.py#729
type: <class 'function'>
Commit: