swapniljariwala / nsepy

Python Library to get publicly available data on NSE website ie. stock quotes, historical data, live indices
https://nsepy-xyz.web.app
Other
759 stars 377 forks source link

get_index_pe_history returns empty dataframe. #257

Open devfinwiz opened 1 year ago

devfinwiz commented 1 year ago
def dataset_generator(indice):  
    history_filename=r"Dataset\Resultant Dataset\\nse_indices_pe_dataset\{}.csv".format(indice)  
    f=open(history_filename,'w',newline="")

    indice_pe = get_index_pe_history(symbol="{}".format(indice),
                                    start=datetime.datetime(2023,1,1),
                                    end=datetime.datetime(2023,2,17))
    print(indice_pe)

gives:

Index: [] Empty DataFrame Columns: [P/E, P/B, Div Yield]