Skip to content

ERR: validation options that accept callables #12706

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
jreback opened this issue Mar 23, 2016 · 3 comments
Closed

ERR: validation options that accept callables #12706

jreback opened this issue Mar 23, 2016 · 3 comments
Labels
Error Reporting Incorrect or improved errors from pandas
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Mar 23, 2016

#12704 (comment)

In [1]: pd.describe_option('float_format')
display.float_format : callable
    The callable should accept a floating point number and return
    a string with the desired format of the number. This is used
    in some places like SeriesFormatter.
    See core.format.EngFormatter for an example.
    [default: None] [currently: None]

This should raise

In [2]: pd.set_option('float_format','%.1f')
@jreback jreback added Difficulty Novice Error Reporting Incorrect or improved errors from pandas labels Mar 23, 2016
@jreback jreback added this to the 0.18.1 milestone Mar 23, 2016
@jreback
Copy link
Contributor Author

jreback commented Mar 23, 2016

the issue is that in core/config_init.py float_format doesn't have a validator.

@tdhopper
Copy link
Contributor

Right: here.

Is callable sufficient?

@jreback
Copy link
Contributor Author

jreback commented Mar 23, 2016

you could prob just create a is_callable = callable here

and validator=is_callable would work I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants