pandarallel icon indicating copy to clipboard operation
pandarallel copied to clipboard

parallel_apply not working with Pandas >= 2.1

Open masc-it opened this issue 1 year ago • 3 comments

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).

masc-it avatar Oct 13 '23 14:10 masc-it

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

perveen-shaheen avatar Dec 05 '23 10:12 perveen-shaheen

Pandaral·lel is looking for a maintainer! If you are interested, please open an GitHub issue.

nalepae avatar Jan 23 '24 09:01 nalepae

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))

shermansiu avatar Apr 27 '24 10:04 shermansiu