Pandas: missing pandas.core.config in v0.25

Created on 19 Jul 2019  Â·  10Comments  Â·  Source: pandas-dev/pandas

Problem description

I need a print table with several columns by default for automatic test purposes while the default number of columns changed from version v0.23. I was using a simple check

if 'display.max_columns' in pandas.core.config._registered_options:
    pandas.set_option('display.max_columns', 20)

but this was broken from v0.25 since the config is missing

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'pandas.core' has no attribute 'config'

I have checked the release notes but I dd not find any info about moving this property...

Code Sample

.core.config._registered_options

Expected Output

Extending the columns to be shown

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit           : None
python           : 3.6.8.final.0
python-bits      : 64
OS               : Linux
OS-release       : 4.15.0-54-generic
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 0.25.0
numpy            : 1.15.4
pytz             : 2018.7
dateutil         : 2.7.5
pip              : 19.1.1

All 10 comments

pandas.core has been private for quite a while

i would just call the pd.set_option()

@jreback well and pd.set_option() is there since when? what does it mean "quite a while"?

@jreback well and pd.set_option() is there since when? what does it mean "quite a while"?

years

does not say anything since we need some legacy pandas versions...

you are using kong private api

use at your own risk

sorry, but pandas.core.config does not look like private... :smiley:

Unfortunately, it's only documented as private: https://pandas.pydata.org/pandas-docs/stable/reference/index.html

Changing it to _core would likely be too disruptive at this stage.

Unfortunately, it's only documented as private: https://pandas.pydata.org/pandas-docs/stable/reference/index.html

Changing it to _core would likely be too disruptive at this stage.

i disagree

i am going to deprecate this

otherwise we will never get out of this hole

May be worth trying (starting with a DeprecationWarning, right?) Then
moving to FutureWarning?

On Mon, Jul 22, 2019 at 11:01 AM Jeff Reback notifications@github.com
wrote:

Unfortunately, it's only documented as private:
https://pandas.pydata.org/pandas-docs/stable/reference/index.html

Changing it to _core would likely be too disruptive at this stage.

i disagree

i am going to deprecate this

otherwise we will never get out of this hole

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pandas-dev/pandas/issues/27471?email_source=notifications&email_token=AAKAOIW5QPVCM3TSURYYQDTQAXKW3A5CNFSM4IFCVQUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2QLJUI#issuecomment-513848529,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKAOIR3IFMPNTFXXLDPFBDQAXKW3ANCNFSM4IFCVQUA
.

May be worth trying (starting with a DeprecationWarning, right?) Then moving to FutureWarning?
…

yeah maybe

Was this page helpful?
0 / 5 - 0 ratings