pandarallel
pandarallel copied to clipboard
parallel_apply not working with Pandas >= 2.1
General
- Operating System: macos 13.0.1
- Python version: 3.10.2
- Pandas version: 2.1
- Pandarallel version: 1.6.5
Bug description
parallel_apply is not working when using pandas >= 2.1. In my case, I am using it after a groupby.
Observed behavior
Progress bar doesn't show up, the processing seems to be run sequentially (according to Activty Monitor).
I am experiencing the exact issue:
- Python version: 3.9
- Pandas version: 2.1.1
- Pandarallel version: 1.6.5 Incidentally, it was working till last week. Has there been any changes
Pandaral·lel is looking for a maintainer! If you are interested, please open an GitHub issue.
It works just fine for me on Pandas 2.1. Do you have a minimal code example to reproduce your bug?
Python: 3.10.13 Pandarallel: 1.6.5 Pandas: 2.1.0 Ubuntu 22.04
import pandas as pd
import pandarallel
pandarallel.pandarallel.initialize(nb_workers=2, progress_bar=True)
df = pd.DataFrame({"foo": range(200), "bar": range(200, 400)})
df["even"] = df["foo"] % 2 == 0
assert df.groupby("even").apply(lambda x: x+1).equals(df.groupby("even").parallel_apply(lambda x: x+1))