I am trying to do EDA and running below code
data = data[~data.age.isnull()].copy()
Getting error as "AttributeError: 'numpy.int64' object has no attribute 'isnull'"
Please help me if anybody knows.
Thanks
I tried to convert the values but still did not get a perfect solution. What I am missing?
Related
I'm trying to run this using PyCaret:
exp = setup(data = df, target = 'CureFlag',fold_shuffle=True, session_id=2)
but I get the error that 'OneHotEncoder' object has no attribute 'get_feature_names'.
Can anyone please help with this?
I used PyCaret 3.0-rc. I developed model and saved them. after almost 3 weeks, now I loaded model. But when I want to use them :
train_predictions = predict_model(model, data=train)
I got the following error:
AttributeError: 'TransformerWrapper' object has no attribute '_memory_transform'
Can any one help me solve it?
I am trying to plot diagnostics using results.plot_diagnostics(). However, I get the following error:
TypeError: 'int' object is not subscriptable
Please see below:
How can I fix this issue?
Thanks
I'm trying to plot coefficients from my means model and am getting this error: AttributeError: 'numpy.ndarray' object has no attribute 'columns'
My code was originally
xvals = X2.columns[1:]
After realizing that arrays don't have columns, they have values, I changed it to .values instead, but got the error: AttributeError: 'numpy.ndarray' object has no attribute 'values'.
So I did some research and saw that I needed(I think) to add either loc or .iloc to it, so I finished with the below code and get the following error 'numpy.ndarray' object has no attribute 'iloc' or loc, depending which one I use. Any ideas?
xvals = X2.loc[1:].values
coeffs =np.exp(reg.coef_[0])-1.0
plot.figure(figsize=(10,5))
plot.bar(xvals, coeffs)
plot.xticks(rotation=90)
plot.ylabel("Coefficients [a.u.]")
plot.show()
django-decouple throws an error
'tuple' object has no attribute 'rsplit'
module_path, class_name = dotted_path.rsplit('.', 1)
AttributeError: 'tuple' object has no attribute 'rsplit'
whenever it encounters '.' e.g django.core.mail.backends.smtp.EmailBackend, smtp.gmail.com
Kindly help
I think dotted_path is not a string, it's a tuple as said in the error message. you probably need to do something like dotted_path[0].rsplit('.', 1)