Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

help for finding a write code

MAHMOUD QASIM

New Member
Handle missing values :
I was trying to fill the missing values with the mean of the respective column. But it doesn't work . when i run the following code
data.absences.head()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-16-b3927aa0c2b7> in <module>
----> 1 data.absences.head()

/usr/local/lib/python3.7/site-packages/pandas/core/generic.py in __getattr__(self, name)
5272 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5273 return self[name]
-> 5274 return object.__getattribute__(self, name)
5275
5276 def __setattr__(self, name: str, value) -> None:

AttributeError: 'DataFrame' object has no attribute 'absences'

here is the PDF attachment file for the whole codes .... could you please help me out ?
 

Attachments

  • My Project.pdf
    50.4 KB · Views: 0

akarsh k

Administrator
Simplilearn Support
Handle missing values :
I was trying to fill the missing values with the mean of the respective column. But it doesn't work . when i run the following code
data.absences.head()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-16-b3927aa0c2b7> in <module>
----> 1 data.absences.head()

/usr/local/lib/python3.7/site-packages/pandas/core/generic.py in __getattr__(self, name)
5272 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5273 return self[name]
-> 5274 return object.__getattribute__(self, name)
5275
5276 def __setattr__(self, name: str, value) -> None:

AttributeError: 'DataFrame' object has no attribute 'absences'

here is the PDF attachment file for the whole codes .... could you please help me out ?
Hi, Please raise ticket, Team will assist you

Please follow the steps below to raise
"Help and support" ticket.
>Login to LMS account,
>Select "help" icon on the top right hand side of the LMS page
>Select any query example:unlocking the certificate
>Connect to "Arya" the virtual assistant
>Select "other"
>To raise a ticket select " yes"
 
Top