-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
DEPR: Deprecate Series/Dataframe.to_dense/to_sparse #26684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
a71737c
fc08e93
82c713d
39230d4
1e7c0e8
e68826c
20b8962
50d0534
933162d
dd1e6c2
c7f27fd
be14520
b12e447
2d4de51
eede9b8
0b08795
5182a1f
15909c5
104c12a
e713fb0
587b14f
1318676
9043e03
58c678a
ca14ac1
0c8f287
871ccff
a8f6c56
72aaca5
6a6e333
4e67856
4a3181b
a546a89
5fdb2f8
a627828
3d36430
9f888c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1887,6 +1887,8 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True, | |
|
|
||
| def to_sparse(self, fill_value=None, kind='block'): | ||
| """ | ||
| ..deprecated:: 0.25.0 | ||
|
|
||
| Convert to SparseDataFrame. | ||
|
|
||
| Implement the sparse version of the DataFrame meaning that any data | ||
|
|
@@ -1939,6 +1941,11 @@ def to_sparse(self, fill_value=None, kind='block'): | |
| >>> type(sdf) # doctest: +SKIP | ||
| <class 'pandas.core.sparse.frame.SparseDataFrame'> | ||
| """ | ||
| warning_message = """\ | ||
VikramjeetD marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| to_sparse is deprecated and will be removed in a future version | ||
| """ | ||
| warnings.warn(warning_message, FutureWarning, stacklevel=2) | ||
|
|
||
| from pandas.core.sparse.api import SparseDataFrame | ||
| return SparseDataFrame(self._series, index=self.index, | ||
|
||
| columns=self.columns, default_kind=kind, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.