Properties are usually decorated methods - so
loc
is not an attribute Output:In [7]: pandas.DataFrame.loc
Out[7]: <property at 0x7fd722e2ce58>
In [9]: pandas.DataFrame.loc??
Type: property
String form: <property object at 0x7fd722e2ce58>
Source:
# pandas.DataFrame.loc.fget
pandas.DataFrame.loc.fget = functools.partial(<class 'pandas.core.indexing._LocIndexer'>, 'loc')
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.