def fetch_single_equity(api_key, symbol, start_date, end_date, retries=5):
 for _ in range(retries):
  try:
   return pd.read_csv(format_wiki_url(api_key, symbol, start_date, end_date), parse_dates=['Date'], index_col='Date', usecols=['Open', 'High', 'Low', 'Close', 'Volume', 'Date', 'Ex-Dividend', 'Split Ratio'], na_values=['NA']).rename(columns={'Open': 'open', 'High': 'high', 'Low': 'low', 'Close': 'close', 'Volume': 'volume', 'Date': 'date', 'Ex-Dividend': 'ex_dividend', 'Split Ratio': 'split_ratio'})
  except Exception:
   log.exception('Exception raised reading Quandl data. Retrying.')
 else:
  raise ValueError(('Failed to download data for %r after %d attempts.' % (symbol, retries)))

def fetch_single_equity ( api_key , symbol , start_date , end_date , retries = 5 ) : for _ in range ( retries ) : try : return pd . read_csv ( format_wiki_url ( api_key , symbol , start_date , end_date ) , parse_dates = [ 'Date' ] , index_col = 'Date' , usecols = [ 'Open' , 'High' , 'Low' , 'Close' , 'Volume' , 'Date' , 'Ex-Dividend' , 'Split Ratio' ] , na_values = [ 'NA' ] ) . rename ( columns = { 'Open' : 'open' , 'High' : 'high' , 'Low' : 'low' , 'Close' : 'close' , 'Volume' : 'volume' , 'Date' : 'date' , 'Ex-Dividend' : 'ex_dividend' , 'Split Ratio' : 'split_ratio' } ) except Exception : log . exception ( 'Exception raised reading Quandl data. Retrying.' ) else : raise ValueError ( ( 'Failed to download data for %r after %d attempts.' % ( symbol , retries ) ) )
download data for a single equity .