Skip to content

missing pandas.core.config in v0.25 #27471

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

Closed
Borda opened this issue Jul 19, 2019 · 10 comments
Closed

missing pandas.core.config in v0.25 #27471

Borda opened this issue Jul 19, 2019 · 10 comments

Comments

@Borda
Copy link
Contributor

Borda commented Jul 19, 2019

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
@jreback
Copy link
Contributor

jreback commented Jul 19, 2019

pandas.core has been private for quite a while

i would just call the pd.set_option()

@jreback jreback closed this as completed Jul 19, 2019
@Borda
Copy link
Contributor Author

Borda commented Jul 19, 2019

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

@jreback
Copy link
Contributor

jreback commented Jul 19, 2019

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

years

@Borda
Copy link
Contributor Author

Borda commented Jul 19, 2019

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

@jreback
Copy link
Contributor

jreback commented Jul 19, 2019

you are using kong private api

use at your own risk

@Borda
Copy link
Contributor Author

Borda commented Jul 21, 2019

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

@TomAugspurger
Copy link
Contributor

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.

@jreback
Copy link
Contributor

jreback commented Jul 22, 2019

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

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jul 22, 2019 via email

@jreback
Copy link
Contributor

jreback commented Jul 22, 2019

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

yeah maybe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants