CLN: use standard method to set unhashable object
#20589 mentioned lgtm. So I decided to test it. And it found this potential improvement. There is even a detailed reference with code examples. https://lgtm.com/rules/1780095/ Very interesting.

Just trying to see if their suggestion works.

ci checks is failing as well > ci checks is failing as well

`pandas/core/generic.py:1767: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[object], int]")  [assignment]`

If __hash__=None is the desired way to indicate unhashable object, this could be a mypy issue.
 xref https://github.com/python/mypy/issues/4266 close for now. It doesn't work with mypy.