Hi guys is there any way i can produce the followi...
# ask-community
i
Hi guys is there any way i can produce the following using prefect
Copy code
for col in date_columns:
        if col in df_columns:
            df[col] = df[col].str.replace('/', '-')
            with mp.Pool(mp.cpu_count()) as pool:
                df[col] = pool.map(get_parsed_date, df[col])
k
I assume you are using Prefect 1.0?
i
yes
k
So you are having trouble with running for loop and using the if-else statement in a flow?
i
no, im wondering how i can replicate the processing done with multiprocessing (mp) on a single dataframe for multiple columns in parallel
k
@Anna Geller Maybe you know this better than me
a
This looks more like a Pandas question more than Prefect, perhaps you may try on Stack overflow? In Prefect 1.0 you would use mapping and you wouldn't need to worry about this low level setup
i
ok, tried with mapping but it doesn’t give me the same performance but thank u for responding
🙌 1