Spaces:
Running
Running
Update nsepython.py
Browse files- nsepython.py +2 -1
nsepython.py
CHANGED
|
@@ -239,7 +239,8 @@ 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 |
-
|
|
|
|
| 243 |
|
| 244 |
# ------------------------- STOCK 52-WEEK HIGH-LOW CSV -------------------------
|
| 245 |
def stock_highlow(date_str):
|
|
|
|
| 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):
|