Modify function call with pesos list for each ticker allocation in Python.

Loading data from Talking to Chatbots Dataset reddgr/talking-to-chatbots-chats

😎 tickers = [‘SLR’,’BBVA’,’BKT’,’GRF’,’FDR’]
pesos = [0.35,0.25,0.15,0.1,0.1]
allocation = [
gen_alloc_data(tk, 0.15)
for tk in tickers
]

Instead of 0.15, we want the second param of gen_alloc_data being the corresponding number in pesos for each of the 5 iterations. I just need the syntaxis. Please skip unnecessary explanations
🤖
python
allocation = [
    gen_alloc_data(tk, w)
    for tk, w in zip(tickers, pesos)
]


Hugging Face Dataset Metrics

All the conversation prompts, responses, and metrics are available to download and explore on Hugging Face dataset reddgr/talking-to-chatbots-chats: