Skip to content

Commit 04bf466

Browse files
committed
shim
1 parent 008931a commit 04bf466

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

doc/source/user_guide/io.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -4658,9 +4658,7 @@ See the `Full Documentation <https://github.com/wesm/feather>`__.
46584658
46594659
Write to a feather file.
46604660

4661-
.. TODO(Arrow 0.15): remove change these back to .. ipython blocks.
4662-
4663-
.. code-block:: python
4661+
.. ipython:: python
46644662
46654663
>>> df.to_feather('example.feather')
46664664

pandas/__init__.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@
191191
if pandas.compat.PY37:
192192

193193
def __getattr__(name):
194+
import warnings
195+
194196
if name == "Panel":
195-
import warnings
196197

197198
warnings.warn(
198199
"The Panel class is removed from pandas. Accessing it "
@@ -206,6 +207,13 @@ class Panel:
206207
pass
207208

208209
return Panel
210+
elif name in {"SparseSeries", "SparseDataFrame"}:
211+
warnings.warn("The {} class is removed from pandas. Accessing it from "
212+
"the top-level namespace will also be removed in the next "
213+
"version".format(name), FutureWarning, stacklevel=2)
214+
215+
return type(name, (), {})
216+
209217
raise AttributeError("module 'pandas' has no attribute '{}'".format(name))
210218

211219

@@ -214,6 +222,12 @@ class Panel:
214222
class Panel:
215223
pass
216224

225+
class SparseDataFrame:
226+
pass
227+
228+
class SparseSeries:
229+
pass
230+
217231

218232
# module level doc-string
219233
__doc__ = """

0 commit comments

Comments
 (0)