

def _maybe_cast_indexer(self, key):
    '\n        If we have a float key and are not a floating index\n        then try to cast to an int if equivalent\n        '
    if (is_float(key) and (not self.is_floating())):
        try:
            ckey = int(key)
            if (key == key):
                key = ckey
        except (ValueError, TypeError):
            pass
    return key

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index._maybe_cast_indexer/VarMisuse@46/105 `ckey`->`key`