Commit 086a824
committed
BUG: Validate float_format setting as callable or None
The `float_format` setting takes either None or a callable object
that returns a formatted string given a float value. Currently, the
setting isn't validated, so cryptic error messages are returned
if, for example, a format non-callable format string is given (see
\#12704). Add a standard validation method and use it to validate
the `float_format` setting.1 parent 4e7974a commit 086a824
File tree
4 files changed
+29
-2
lines changed- doc/source/whatsnew
- pandas
- core
- tests
4 files changed
+29
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
282 | | - | |
| 283 | + | |
| 284 | + | |
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
209 | 215 | | |
210 | 216 | | |
211 | 217 | | |
| |||
0 commit comments