Skip to content

Commit 083227c

Browse files
committed
Merge remote branch 'y-p/deprec_print'
* y-p/deprec_print: CLN: rename "print_config.X" to "print.X" DOC: add openpyxl, xlrd/xlwt as optional dependencies to README DOC: document change of to_string() to return unicode ENH: dynamic docstrings for options API CLN: add deprecation warning to set_printoptions, reset_printoptions
2 parents 3950684 + 2f67650 commit 083227c

File tree

12 files changed

+314
-186
lines changed

12 files changed

+314
-186
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Optional dependencies
7777
* Needed for parts of :mod:`pandas.stats`
7878
* `pytz <http://pytz.sourceforge.net/>`__
7979
* Needed for time zone support with ``DateRange``
80+
* `openpyxl <http://packages.python.org/openpyxl/>`__, `xlrd/xlwt <http://www.python-excel.org/>`__
81+
* Needed for Excel I/O
8082

8183
Installation from sources
8284
=========================

doc/source/v0.10.0.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,17 @@ API changes
135135
- ``reset_option`` - reset one or more options to their default value. Partial names are accepted.
136136
- ``describe_option`` - print a description of one or more options. When called with no arguments. print all registered options.
137137

138-
Note: ``set_printoptions`` is now deprecated (but functioning), the print options now live under "print_config.XYZ". For example:
138+
Note: ``set_printoptions``/ ``reset_printoptions`` are now deprecated (but functioning), the print options now live under "print.XYZ". For example:
139139

140140

141141
.. ipython:: python
142142

143143
import pandas as pd
144-
pd.get_option("print_config.max_rows")
144+
pd.get_option("print.max_rows")
145+
146+
147+
- to_string() methods now always return unicode strings (GH2224_).
148+
145149

146150
See the `full release notes
147151
<https://github.com/pydata/pandas/blob/master/RELEASE.rst>`__ or issue tracker
@@ -151,3 +155,4 @@ on GitHub for a complete list.
151155
.. _GH1996: https://github.com/pydata/pandas/issues/1996
152156
.. _GH2316: https://github.com/pydata/pandas/issues/2316
153157
.. _GH2097: https://github.com/pydata/pandas/issues/2097
158+
.. _GH2224: https://github.com/pydata/pandas/issues/2224

pandas/core/common.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ def in_qtconsole():
11281128
# 2) If you need to send something to the console, use console_encode().
11291129
#
11301130
# console_encode() should (hopefully) choose the right encoding for you
1131-
# based on the encoding set in option "print_config.encoding"
1131+
# based on the encoding set in option "print.encoding"
11321132
#
11331133
# 3) if you need to write something out to file, use
11341134
# pprint_thing_encoded(encoding).
@@ -1187,10 +1187,10 @@ def pprint_thing(thing, _nest_lvl=0):
11871187
hasattr(thing,'next'):
11881188
return unicode(thing)
11891189
elif (isinstance(thing, dict) and
1190-
_nest_lvl < get_option("print_config.pprint_nest_depth")):
1190+
_nest_lvl < get_option("print.pprint_nest_depth")):
11911191
result = _pprint_dict(thing, _nest_lvl)
11921192
elif _is_sequence(thing) and _nest_lvl < \
1193-
get_option("print_config.pprint_nest_depth"):
1193+
get_option("print.pprint_nest_depth"):
11941194
result = _pprint_seq(thing, _nest_lvl)
11951195
else:
11961196
# when used internally in the package, everything
@@ -1222,8 +1222,8 @@ def console_encode(object):
12221222
this is the sanctioned way to prepare something for
12231223
sending *to the console*, it delegates to pprint_thing() to get
12241224
a unicode representation of the object relies on the global encoding
1225-
set in print_config.encoding. Use this everywhere
1225+
set in print.encoding. Use this everywhere
12261226
where you output to the console.
12271227
"""
12281228
return pprint_thing_encoded(object,
1229-
get_option("print_config.encoding"))
1229+
get_option("print.encoding"))

0 commit comments

Comments
 (0)