av_link = 'https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=' +
ticker + '&outputsize=full&apikey=test&datatype=csv'
df_stock = pd.read_csv(av_link)
print(df_stock)
index_earning_value = []
print(actual_date_name)
for y in actual_date_name:
index_earning_value.append(df_stock.index[df_stock['timestamp']==str(y)])
print(index_earning_value)
This is the ouput of the list:
[Int64Index([88], dtype='int64'), Int64Index([151], dtype='int64'), Int64Index([212], dtype='int64'), Int64Index([276], dtype='int64'), Int64Index([], dtype='int64')]