eshan6704 commited on
Commit
5d6aa98
·
verified ·
1 Parent(s): 936b995

Update nsepython.py

Browse files
Files changed (1) hide show
  1. nsepython.py +4 -4
nsepython.py CHANGED
@@ -238,13 +238,13 @@ def nse_csv_fetch(url):
238
 
239
  # ------------------------- INDEX HIGH-LOW CSV -------------------------
240
  def nse_highlow(date_str):
241
-
242
- return pd.DataFrame(nse_csv_fetch("https://archives.nseindia.com/content/indices/" f"ind_close_all_{date_str}.csv"))
243
 
244
  # ------------------------- STOCK 52-WEEK HIGH-LOW CSV -------------------------
245
  def stock_highlow(date_str):
246
-
247
- csv_text= nse_csv_fetch( "https://archives.nseindia.com/content/"f"CM_52_wk_High_low_{date_str}.csv")
248
  return pd.read_csv(StringIO(csv_text), header=2)
249
  # ------------------------- ZIP CSV FETCH -------------------------
250
  def nse_zip_csv_fetch(url):
 
238
 
239
  # ------------------------- INDEX HIGH-LOW CSV -------------------------
240
  def nse_highlow(date_str):
241
+ url="https://archives.nseindia.com/content/indices/" f"ind_close_all_{date_str}.csv"
242
+ return pd.DataFrame(nse_csv_fetch(url))
243
 
244
  # ------------------------- STOCK 52-WEEK HIGH-LOW CSV -------------------------
245
  def stock_highlow(date_str):
246
+ url="https://archives.nseindia.com/content/"f"CM_52_wk_High_low_{date_str}.csv"
247
+ csv_text= nse_csv_fetch(url )
248
  return pd.read_csv(StringIO(csv_text), header=2)
249
  # ------------------------- ZIP CSV FETCH -------------------------
250
  def nse_zip_csv_fetch(url):