Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sparsity/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.3
0.10.0
7 changes: 7 additions & 0 deletions sparsity/sparse_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,13 @@ def sort_index(self):
index = self._index[passive_sort_idx]
return SparseFrame(data, index=index)

def fillna(self, value):
"""Replace NaN values in explicitly stored data with `value`."""
_data = self._data.copy()
_data.data[np.isnan(self._data.data)] = value
return SparseFrame(data=_data[:-1, :],
index=self.index, columns=self.columns)

def add(self, other, how='outer', **kwargs):
"""
Aligned addition. Adds two tables by aligning them first.
Expand Down