Skip to content

Commit abde6ff

Browse files
author
y-p
committed
DOC: add note on pickle being unsafe to docs and pd.load docstring
1 parent 77618f0 commit abde6ff

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

doc/source/basics.rst

+7
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,13 @@ There is also a ``save`` function which takes any object as its first argument:
12261226
import os
12271227
os.remove('foo.pickle')
12281228
1229+
.. warning::
1230+
1231+
Loading pickled data received from untrusted sources can be unsafe.
1232+
1233+
See: http://docs.python.org/2.7/library/pickle.html
1234+
1235+
12291236
Working with package options
12301237
----------------------------
12311238

pandas/core/common.py

+3
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,9 @@ def load(path):
15731573
Load pickled pandas object (or any other pickled object) from the specified
15741574
file path
15751575
1576+
Warning: Loading pickled data received from untrusted sources can be unsafe.
1577+
See: http://docs.python.org/2.7/library/pickle.html
1578+
15761579
Parameters
15771580
----------
15781581
path : string

0 commit comments

Comments
 (0)