No Usageband


(Kashish Mukheja) #1

On running the code :-

df_raw.UsageBand.cat.set_categories([‘High’, ‘Medium’, ‘Low’], ordered=True, inplace=True)

AttributeError Traceback (most recent call last)
in ()
----> 1 df_raw.UsageBand.cat.set_categories([‘High’, ‘Medium’, ‘Low’], ordered=True, inplace=True)

/usr/local/lib/python3.6/dist-packages/pandas/core/generic.py in getattr(self, name)
3612 if name in self._info_axis:
3613 return self[name]
-> 3614 return object.getattribute(self, name)
3615
3616 def setattr(self, name, value):

AttributeError: 'DataFrame’ object has no attribute 'UsageBand’

Pls Help!


(Kashish Mukheja) #2

Sorry found my mistake!


(LOREN T HOPKINS) #3

What was the mistake please. I’m having the same problem


(LOREN T HOPKINS) #4

Don’t worry. Figured it out. Cheers :grinning:


(Kashish Mukheja) #5

Alright :grinning:


#6

@kashish18 Hey, I am also getting the similar error can you point me towards a mistake.