Last answered:

01 Dec 2021

Posted on:

11 Nov 2021

0

Error in this part: absenteeism_scaler = CustomScaler(columns_to_scale)

I have this error when execute this command absenteeism_scaler = CustomScaler(columns_to_scale), how can I solve it?

--------------------------------------------------------------------------- TypeError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_12020/3359409692.py in <module> ----> 1 absenteeism_scaler = CustomScaler(columns_to_scale) ~\AppData\Local\Temp/ipykernel_12020/1483241705.py in __init__(self, columns, copy, with_mean, with_std)  5   6 def __init__(self,columns,copy=True,with_mean=True,with_std=True): ----> 7 self.scaler = StandardScaler(copy,with_mean,with_std)  8 self.columns = columns  9 self.mean_ = None TypeError: __init__() takes 1 positional argument but 4 were given

4 answers ( 0 marked as helpful)
Instructor
Posted on:

14 Nov 2021

0

Hi Hector!

Thanks for reaching out.

Did you create the absenteeism_module code yourself? If yes, can you please retry by using the code we've provided and see if that would solve the problem (which, if that happens, would mean that there might have been an error in the code defining the module)?

Hope this helps but please feel free to get back to us should you need further assistance. Thank you.
Best,
Martin

Posted on:

14 Nov 2021

0

Hi Martin

At first I try to create the code by myself. When I have problems I use the code you provide and I have the same result, I can´t undesrtand why this error still happen

Thank for your response

Posted on:

19 Nov 2021

0

I am facing the same issue. Please support!

Instructor
Posted on:

01 Dec 2021

0

Hi Hector and Doula!

Thanks for your replies.

In that case, can  you please update the libraries used for the creation of the absenteeism_module and retry (i.e. numpy, statsmodels etc.). They are all interconnected and sometimes what we need is to update them simultaneously.
Please retry and let us know if this helps you solve the issue. Thank you.

Looking forward to your answer.
Best,
Martin

Submit an answer