Skip to content

Commit d92650f

Browse files
committed
warnings in docs
1 parent a05982e commit d92650f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/source/user_guide/io.rst

+7
Original file line numberDiff line numberDiff line change
@@ -3401,6 +3401,7 @@ both on the writing (serialization), and reading (deserialization).
34013401
:func:`read_msgpack` is only guaranteed backwards compatible back to pandas version 0.20.3
34023402

34033403
.. ipython:: python
3404+
:okwarning:
34043405
34053406
df = pd.DataFrame(np.random.rand(5, 2), columns=list('AB'))
34063407
df.to_msgpack('foo.msg')
@@ -3410,20 +3411,23 @@ both on the writing (serialization), and reading (deserialization).
34103411
You can pass a list of objects and you will receive them back on deserialization.
34113412

34123413
.. ipython:: python
3414+
:okwarning:
34133415
34143416
pd.to_msgpack('foo.msg', df, 'foo', np.array([1, 2, 3]), s)
34153417
pd.read_msgpack('foo.msg')
34163418
34173419
You can pass ``iterator=True`` to iterate over the unpacked results:
34183420

34193421
.. ipython:: python
3422+
:okwarning:
34203423
34213424
for o in pd.read_msgpack('foo.msg', iterator=True):
34223425
print(o)
34233426
34243427
You can pass ``append=True`` to the writer to append to an existing pack:
34253428

34263429
.. ipython:: python
3430+
:okwarning:
34273431
34283432
df.to_msgpack('foo.msg', append=True)
34293433
pd.read_msgpack('foo.msg')
@@ -3434,6 +3438,7 @@ can pack arbitrary collections of Python lists, dicts, scalars, while intermixin
34343438
pandas objects.
34353439

34363440
.. ipython:: python
3441+
:okwarning:
34373442
34383443
pd.to_msgpack('foo2.msg', {'dict': [{'df': df}, {'string': 'foo'},
34393444
{'scalar': 1.}, {'s': s}]})
@@ -3452,12 +3457,14 @@ Read/write API
34523457
Msgpacks can also be read from and written to strings.
34533458

34543459
.. ipython:: python
3460+
:okwarning:
34553461
34563462
df.to_msgpack()
34573463
34583464
Furthermore you can concatenate the strings to produce a list of the original objects.
34593465

34603466
.. ipython:: python
3467+
:okwarning:
34613468
34623469
pd.read_msgpack(df.to_msgpack() + s.to_msgpack())
34633470

doc/source/whatsnew/v0.13.0.rst

+2
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ Experimental
829829
Since this is an EXPERIMENTAL LIBRARY, the storage format may not be stable until a future release.
830830

831831
.. ipython:: python
832+
:okwarning:
832833
833834
df = pd.DataFrame(np.random.rand(5, 2), columns=list('AB'))
834835
df.to_msgpack('foo.msg')
@@ -841,6 +842,7 @@ Experimental
841842
You can pass ``iterator=True`` to iterator over the unpacked results
842843

843844
.. ipython:: python
845+
:okwarning:
844846
845847
for o in pd.read_msgpack('foo.msg', iterator=True):
846848
print(o)

0 commit comments

Comments
 (0)