Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Jun 28, 2019
1 parent 5bcc589 commit 1900376
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3466,7 +3466,7 @@ Furthermore you can concatenate the strings to produce a list of the original ob
.. ipython:: python
:okwarning:
pd.read_msgpack(df.to_msgpack() + s.to_msgpack())
pd.read_msgpack(df.to_msgpack() + s.to_msgpack())
.. _io.hdf5:

Expand Down
4 changes: 4 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2420,6 +2420,10 @@ def to_msgpack(self, path_or_buf=None, encoding='utf-8', **kwargs):
.. deprecated:: 0.25.0
to_msgpack is deprecated and will be removed in a future version.
It is recommended to use pyarrow for on-the-wire transmission of
pandas objects.
Parameters
----------
path : string File path, buffer-like, or None
Expand Down
14 changes: 11 additions & 3 deletions pandas/io/packers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def to_msgpack(path_or_buf, *args, **kwargs):
.. deprecated:: 0.25.0
to_msgpack is deprecated and will be removed in a future version.
It is recommended to use pyarrow for on-the-wire transmission of
pandas objects.
Parameters
----------
path_or_buf : string File path, buffer-like, or None
Expand All @@ -91,11 +95,11 @@ def to_msgpack(path_or_buf, *args, **kwargs):
compress : type of compressor (zlib or blosc), default to None (no
compression)
"""
warnings.warn("The read_msgpack is deprecated and will be removed in a "
warnings.warn("to_msgpack is deprecated and will be removed in a "
"future version.\n"
"It is recommended to use pyarrow for on-the-wire "
"transmission of pandas objects.",
FutureWarning, stacklevel=2)
FutureWarning, stacklevel=3)

global compressor
compressor = kwargs.pop('compress', None)
Expand Down Expand Up @@ -128,6 +132,10 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):
.. deprecated:: 0.25.0
read_msgpack is deprecated and will be removed in a future version.
It is recommended to use pyarrow for on-the-wire transmission of
pandas objects.
Parameters
----------
path_or_buf : string File path, BytesIO like or string
Expand All @@ -148,7 +156,7 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):
"future version.\n"
"It is recommended to use pyarrow for on-the-wire "
"transmission of pandas objects.",
FutureWarning, stacklevel=2)
FutureWarning, stacklevel=3)

path_or_buf, _, _, should_close = get_filepath_or_buffer(path_or_buf)
if iterator:
Expand Down

0 comments on commit 1900376

Please sign in to comment.