eshan6704 commited on
Commit
a563891
·
verified ·
1 Parent(s): ecffcb0

Update nsepython.py

Browse files
Files changed (1) hide show
  1. nsepython.py +4 -4
nsepython.py CHANGED
@@ -239,14 +239,14 @@ def nse_csv_fetch(url):
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
- csv_text= nse_csv_fetch(url )
243
- return pd.read_csv(StringIO(csv_text), header=0)
244
 
245
  # ------------------------- STOCK 52-WEEK HIGH-LOW CSV -------------------------
246
  def stock_highlow(date_str):
247
  url="https://archives.nseindia.com/content/"f"CM_52_wk_High_low_{date_str}.csv"
248
- csv_text= nse_csv_fetch(url )
249
- return pd.read_csv(StringIO(csv_text), header=2)
250
  # ------------------------- ZIP CSV FETCH -------------------------
251
  def nse_zip_csv_fetch(url):
252
  """
 
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
+
243
+ return pd.read_csv(url, header=0)
244
 
245
  # ------------------------- STOCK 52-WEEK HIGH-LOW CSV -------------------------
246
  def stock_highlow(date_str):
247
  url="https://archives.nseindia.com/content/"f"CM_52_wk_High_low_{date_str}.csv"
248
+
249
+ return pd.read_csv(url, header=2)
250
  # ------------------------- ZIP CSV FETCH -------------------------
251
  def nse_zip_csv_fetch(url):
252
  """