-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
OptionError
raised by top-level function pandas.set_option
is private
#27553
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
Comments
@huandzh Thanks for the report. |
@simonjayhawkins Glad to help. |
cc @jbrockmendel I think you recently put effort in separating the (we could also easily, for such case, import the error from pandas._config.config into pandas.errors, although in general it is better the other way around to see the correct code path of the error) |
See also #27656, I made a general issue for all custom errors/warnings. |
The idea for _config is to treat it as entirely upstream of the rest of pandas, so yah, importing it into pandas.errors is teh way to go. |
Code Sample
Problem description
OptionError
is raised by top-level functionpandas.set_option
, but can only be imported from private modulepandas._config.config
.Sample code will failed when importing it from
pandas.errors
:Expected Output
Expected behavior :
OptionError
can be imported frompandas.errors
orpandas
. And other custom exceptions raised by top-level functions are also available in the same public namespace.Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Linux
OS-release : 4.4.0-17763-Microsoft
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 0.25.0
numpy : 1.16.4
pytz : 2019.1
dateutil : 2.8.0
pip : 19.1.1
setuptools : 41.0.1
Cython : 0.29.12
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.1
IPython : 7.6.1
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.1.1
numexpr : None
odfpy : None
openpyxl : 2.6.2
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : None
The text was updated successfully, but these errors were encountered: