def clear_dataframe_indexer_caches(df):
 for attr in _INDEXER_NAMES:
  try:
   delattr(df, attr)
  except AttributeError:
   pass

def clear_dataframe_indexer_caches ( df ) : for attr in _INDEXER_NAMES : try : delattr ( df , attr ) except AttributeError : pass
clear cached attributes from a pandas dataframe .