def convert_from_missing_indexer_tuple ( indexer , axes ) : def get_indexer ( _i , _idx ) : return ( axes [ _i ] . get_loc ( _idx [ 'key' ] ) if isinstance ( _idx , dict ) else _idx ) return tuple ( get_indexer ( _i , _idx ) for _i , _idx in enumerate ( indexer ) )
to many indexers in python
create a filtered indexer that doesn t have any missing indexers
def convert_from_missing_indexer_tuple(indexer, axes):
    """
    create a filtered indexer that doesn't have any missing indexers
    """

    def get_indexer(_i, _idx):
        return (axes[_i].get_loc(_idx['key']) if isinstance(_idx, dict) else
                _idx)

    return tuple(get_indexer(_i, _idx) for _i, _idx in enumerate(indexer))