Commit 9dbf7dc
Gabriel Corona
Don't fail when plotting Series/DataFrame with no row
When Series or DataFrames was empty (no cells) after removing columns without a suitable type (.select_dtypes), pandas was throwing a "no numeric data to plot" exception. This can happen: 1) either because there is no column with a suitable type; 2) or if there is no row. Raising an exception in the first case makes sense but we should probably avoid throwing an exception in the second case.1 parent 03b3c8f commit 9dbf7dc
File tree
3 files changed
+17
-1
lines changed- doc/source/whatsnew
- pandas
- plotting/_matplotlib
- tests/plotting
3 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3229 | 3229 | | |
3230 | 3230 | | |
3231 | 3231 | | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
3232 | 3247 | | |
3233 | 3248 | | |
3234 | 3249 | | |
| |||
0 commit comments