Can't pickle local object 'Styler' in Pandas DataFrames

Viewed 237

I have a <pandas.io.formats.style.Styler object at 0x7f29e1969430>.

I need to return this data through a return function, but I get this error:

'ERROR - Can't pickle local object 'Styler.applymap.<locals>.<lambda>'

I don't know what's the meaning of that sentence.

Tha's the code I trying to pass in a return function:

def dag_transform_data(**kwargs):
    charges = kwargs["ti"].xcom_pull("get_charges_report")
    active_payments = kwargs["ti"].xcom_pull("get_active_payments_report")
    return_payments = kwargs["ti"].xcom_pull("get_return_payments_report")
    return transform_data(charges, active_payments, return_payments)

This function returns <pandas.io.formats.style.Styler object at 0x7f29e1969430>.

Any solution?

Thanks in advance.

0 Answers
Related