(df, method, check=True)
| 406 | |
| 407 | |
| 408 | def fillna_check(df, method, check=True): |
| 409 | if method: |
| 410 | out = getattr(df, method)() |
| 411 | else: |
| 412 | out = df.fillna() |
| 413 | if check and out.isnull().values.all(axis=0).any(): |
| 414 | raise ValueError( |
| 415 | "All NaN partition encountered in `fillna`. Try " |
| 416 | "using ``df.repartition`` to increase the partition " |
| 417 | "size, or specify `limit` in `fillna`." |
| 418 | ) |
| 419 | return out |
| 420 | |
| 421 | |
| 422 | # --------------------------------- |