Skip to content

CLN: add deprecation warning to set_printoptions, reset_printoptions #2393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from Dec 1, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Optional dependencies
* Needed for parts of :mod:`pandas.stats`
* `pytz <http://pytz.sourceforge.net/>`__
* Needed for time zone support with ``DateRange``
* `openpyxl <http://packages.python.org/openpyxl/>`__, `xlrd/xlwt <http://www.python-excel.org/>`__
* Needed for Excel I/O

Installation from sources
=========================
Expand Down
9 changes: 7 additions & 2 deletions doc/source/v0.10.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,17 @@ API changes
- ``reset_option`` - reset one or more options to their default value. Partial names are accepted.
- ``describe_option`` - print a description of one or more options. When called with no arguments. print all registered options.

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


.. ipython:: python

import pandas as pd
pd.get_option("print_config.max_rows")
pd.get_option("print.max_rows")


- to_string() methods now always return unicode strings (GH2224_).


See the `full release notes
<https://github.com/pydata/pandas/blob/master/RELEASE.rst>`__ or issue tracker
Expand All @@ -138,3 +142,4 @@ on GitHub for a complete list.
.. _GH1996: https://github.com/pydata/pandas/issues/1996
.. _GH2316: https://github.com/pydata/pandas/issues/2316
.. _GH2097: https://github.com/pydata/pandas/issues/2097
.. _GH2224: https://github.com/pydata/pandas/issues/2224
10 changes: 5 additions & 5 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ def in_qtconsole():
# 2) If you need to send something to the console, use console_encode().
#
# console_encode() should (hopefully) choose the right encoding for you
# based on the encoding set in option "print_config.encoding"
# based on the encoding set in option "print.encoding"
#
# 3) if you need to write something out to file, use
# pprint_thing_encoded(encoding).
Expand Down Expand Up @@ -1187,10 +1187,10 @@ def pprint_thing(thing, _nest_lvl=0):
hasattr(thing,'next'):
return unicode(thing)
elif (isinstance(thing, dict) and
_nest_lvl < get_option("print_config.pprint_nest_depth")):
_nest_lvl < get_option("print.pprint_nest_depth")):
result = _pprint_dict(thing, _nest_lvl)
elif _is_sequence(thing) and _nest_lvl < \
get_option("print_config.pprint_nest_depth"):
get_option("print.pprint_nest_depth"):
result = _pprint_seq(thing, _nest_lvl)
else:
# when used internally in the package, everything
Expand Down Expand Up @@ -1222,8 +1222,8 @@ def console_encode(object):
this is the sanctioned way to prepare something for
sending *to the console*, it delegates to pprint_thing() to get
a unicode representation of the object relies on the global encoding
set in print_config.encoding. Use this everywhere
set in print.encoding. Use this everywhere
where you output to the console.
"""
return pprint_thing_encoded(object,
get_option("print_config.encoding"))
get_option("print.encoding"))
Loading