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