Home › Forums › kdb+ › qpython to select columns from table › Re: qpython to select columns from table
-
Some ways:
q("{((),x)#y}", numpy.string_("iq"), numpy.string_("t")) q("{value"select ",string[x],"from ",string y}", "iq", "t") q("select %s from %s" % ("iq","t")) q("{?[y;();0b;{x!x}(),x]}", numpy.string_("iq"), numpy.string_("t"))
- Using # https://code.kx.com/q/ref/take/
- Using value https://code.kx.com/q/ref/value/
- Python string formatting
- Functional select https://code.kx.com/q/basics/funsql/
Functional selects are the most powerful way https://code.kx.com/q/wp/parse-trees/