extend with volume. . . triplet of symbol-date-value

@DiaAzul . . . .

some time ago you suggested me a solution to extract some data via yahooquery.
See: Python node: More than one type in column. Found int and float - #6 by DiaAzul

I would like to extend this with the daily volumes (so symbol-date-value**-volume**).

However, up to now I don’t succeed because my coding is wrong. Can you help me once again. See my script in the screenshot

Many THNX in advance

Hi @sanderlenselink -

Any chance you can upload the actual workflow with some dummy data for people to try to replicate the issue? I’m afraid this one might be hard to troubleshoot with a single screenshot…

Hi @ScottF

you’re right . . . so, please find attached an example.

My goal is to get a table like the screenshot.

In the mean time (and thnx to ChatGTP :innocent:) my script does what it must do. However, there are some things I want to improve but I’m still struggling:

(1) my dataset consists of about 1.000 rows and it takes quite a long time to run (compared to other scripts that also run on those 1.000 rows)
In this script I select for one quarter for all day the price. In reality I need for 5 years the prices of all days. And than a fast script makes sense

Maybe someone has an idea to speed it up.

(2) from the Python output to the final table I use 7 KNIME-nodes. I’m curious whether you can do the same within Python with some extra lines of code.
As said, only because I’m curious

THNX in advance


MFI_index.knwf (17.7 KB)

Problem solve by using KNIO . . .

import pandas as pd
from yahooquery import Ticker
import knime_io as knio
input_table_1 = knio.input_tables[0].to_pyarrow()

1 Like

Thanks for posting the solution you found :+1: