diff --git a/sparsity/VERSION b/sparsity/VERSION index b3ec163..2774f85 100644 --- a/sparsity/VERSION +++ b/sparsity/VERSION @@ -1 +1 @@ -0.9.3 \ No newline at end of file +0.10.0 \ No newline at end of file diff --git a/sparsity/sparse_frame.py b/sparsity/sparse_frame.py index e92f4fa..bb17eee 100644 --- a/sparsity/sparse_frame.py +++ b/sparsity/sparse_frame.py @@ -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.