Reference Manual¶
(This section is generated from the PyQ source code. You can access most of this material using pydoc or the built-in help method.)
K |
proxies for kdb+ objects |
q |
a portal to kdb+ |
class K¶
-
class
pyq.K¶ proxies for kdb+ objects
>>> q('2005.01.01 2005.12.04') k('2005.01.01 2005.12.04')
Iteration over simple lists produces python objects
>>> list(q("`a`b`c`d")) ['a', 'b', 'c', 'd']
Iteration over q tables produces q dictionaries
>>> list(q("([]a:`x`y`z;b:1 2 3)")) [k('`a`b!(`x;1)'), k('`a`b!(`y;2)'), k('`a`b!(`z;3)')]
Iteration over a q dictionary iterates over its key
>>> list(q('`a`b!1 2')) ['a', 'b']
as a consequence, iteration over a keyed table is the same as iteration over its key table
>>> list(q("([a:`x`y`z]b:1 2 3)")) [k('(,`a)!,`x'), k('(,`a)!,`y'), k('(,`a)!,`z')]
Callbacks into python
>>> def f(x, y): ... return x + y >>> q('{[f]f(1;2)}', f) k('3')
Buffer protocol
The following session illustrates how buffer protocol implemented by K objects can be used to write data from Python streams directly yo kdb+.
Create a list of chars in kdb+
>>> x = kp('xxxxxx')
Open a pair of file descriptors
>>> r, w = os.pipe()
Write 6 bytes to the write end
>>> os.write(w, b'abcdef') 6
Read from the read-end into x
>>> f = os.fdopen(r, mode='rb') >>> f.readinto(x) 6
Now x contains the bytes that were sent through the pipe
>>> x k('"abcdef"')
Close the descriptors and the stream
>>> os.close(w); f.close()
Low level interface
The K type provides a set of low level functions that are similar to the C API provided by the k.h header. The C API functions that return K objects in C are implemented as class methods that return instances of K type.
Atoms
>>> K._kb(True), K._kg(5), K._kh(42), K._ki(-3), K._kj(2**40) (k('1b'), k('0x05'), k('42h'), k('-3i'), k('1099511627776'))
>>> K._ke(3.5), K._kf(1.0), K._kc(b'x'), K._ks('xyz') (k('3.5e'), k('1f'), k('"x"'), k('`xyz'))
>>> K._kd(0), K._kz(0.0), K._kt(0) (k('2000.01.01'), k('2000.01.01T00:00:00.000'), k('00:00:00.000'))
Tables and dictionaries
>>> x = K._xD(k('`a`b`c'), k('1 2 3')); x, K._xT(x) (k('`a`b`c!1 2 3'), k('+`a`b`c!1 2 3'))
Keyed table
>>> t = K._xD(K._xT(K._xD(k(",`a"), k(",1 2 3"))), ... K._xT(K._xD(k(",`b"), k(",10 20 30")))) >>> K._ktd(t) k('+`a`b!(1 2 3;10 20 30)')
K objects can be used in Python arithmetic expressions
>>> x, y, z = map(K, (1, 2, 3)) >>> print(x + y, x * y, ... z/y, x|y, x&y, abs(-z)) 3 2 1.5 2 1 3
Mixing K objects with python numbers is allowed
>>> 1/q('1 2 4') k('1 0.5 0.25') >>> q.til(5)**2 k('0 1 4 9 16f')
-
__call__¶ Call self as a function.
-
__contains__(item)¶ membership test
>>> 1 in q('1 2 3') True
>>> 'abc' not in q('(1;2.0;`abc)') False
-
__eq__(other)¶ >>> K(1) == K(1) True >>> K(1) == None False
-
__float__()¶ converts K scalars to python float
>>> [float(q(x)) for x in '1b 2h 3 4e `5 6.0 2000.01.08'.split()] [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]
-
__get__¶ Return an attribute of instance, which is of type owner.
-
__getattr__(a)¶ table columns can be accessed via dot notation
>>> q("([]a:1 2 3; b:10 20 30)").a k('1 2 3')
-
__getitem__(x)¶ >>> k("10 20 30 40 50")[k("1 3")] k('20 40') >>> k("`a`b`c!1 2 3")['b'] 2
-
__int__()¶ converts K scalars to python int
>>> [int(q(x)) for x in '1b 2h 3 4e `5 6.0 2000.01.08'.split()] [1, 2, 3, 4, 5, 6, 7]
-
exec(columns=(), by=(), where=(), **kwds)¶ exec from self
>>> t = q('([]a:1 2 3; b:10 20 30)') >>> t.exec_('a', where='b > 10').show() 2 3
-
keys()¶ returns q(‘key’, self)
Among other uses, enables interoperability between q and python dicts.
>>> from collections import OrderedDict >>> OrderedDict(q('`a`b!1 2')) OrderedDict([('a', 1), ('b', 2)]) >>> d = {}; d.update(q('`a`b!1 2')) >>> list(sorted(d.items())) [('a', 1), ('b', 2)]
-
select(columns=(), by=(), where=(), **kwds)¶ select from self
>>> t = q('([]a:1 2 3; b:10 20 30)') >>> t.select('a', where='b > 20').show() a - 3
-
show(start=0, geometry=None, output=None)¶ pretty-print data to the console
(similar to q.show, but uses python stdout by default)
>>> x = q('([k:`x`y`z]a:1 2 3;b:10 20 30)') >>> x.show() k| a b -| ---- x| 1 10 y| 2 20 z| 3 30
the first optional argument, ‘start’ specifies the first row to be printed (negative means from the end)
>>> x.show(2) k| a b -| ---- z| 3 30
>>> x.show(-2) k| a b -| ---- y| 2 20 z| 3 30
the geometry is the height and width of the console
>>> x.show(geometry=[4, 6]) k| a.. -| -.. x| 1.. ..
-
update(columns=(), by=(), where=(), **kwds)¶ update from self
>>> t = q('([]a:1 2 3; b:10 20 30)') >>> t.update('a*2', ... where='b > 20').show() a b ---- 1 10 2 20 6 30
-
-
K.abs()¶ absolute value
For details, see
q.absand abs on code.kx.com.
-
K.acos()¶ arc cosine
For details, see
q.acosand acos on code.kx.com.
-
K.aj()¶ as-of join
For details, see
q.ajand aj on code.kx.com.
-
K.aj0()¶ as-of join
For details, see
q.aj0and aj on code.kx.com.
-
K.all()¶ all nonzero
For details, see
q.alland all on code.kx.com.
-
K.and_()¶ and
For details, see
q.and_and and on code.kx.com.
-
K.any()¶ any item is non-zero
For details, see
q.anyand any on code.kx.com.
-
K.asc()¶ ascending sort
For details, see
q.ascand asc on code.kx.com.
-
K.asin()¶ arc sine
For details, see
q.asinand asin on code.kx.com.
-
K.asof()¶ as-of operator
For details, see
q.asofand asof on code.kx.com.
-
K.atan()¶ arc tangent
For details, see
q.atanand atan on code.kx.com.
-
K.attr()¶ attributes
For details, see
q.attrand attr on code.kx.com.
-
K.avg()¶ arithmetic mean
For details, see
q.avgand avg on code.kx.com.
-
K.avgs()¶ running averages
For details, see
q.avgsand avgs on code.kx.com.
-
K.bin()¶ binary search
For details, see
q.binand bin on code.kx.com.
-
K.binr()¶ binary search
For details, see
q.binrand bin on code.kx.com.
-
K.ceiling()¶ lowest integer above
For details, see
q.ceilingand ceiling on code.kx.com.
-
K.cols()¶ column names of a table
For details, see
q.colsand cols on code.kx.com.
-
K.cor()¶ correlation
For details, see
q.corand cor on code.kx.com.
-
K.cos()¶ cosine
For details, see
q.cosand cos on code.kx.com.
-
K.count()¶ number of items
For details, see
q.countand count on code.kx.com.
-
K.cov()¶ statistical covariance
For details, see
q.covand cov on code.kx.com.
-
K.cross()¶ cross product
For details, see
q.crossand cross on code.kx.com.
-
K.csv()¶ comma delimiter
For details, see
q.csvand csv on code.kx.com.
-
K.cut()¶ cut
For details, see
q.cutand cut on code.kx.com.
-
K.deltas()¶ differences between consecutive pairs
For details, see
q.deltasand deltas on code.kx.com.
-
K.desc()¶ descending sort
For details, see
q.descand desc on code.kx.com.
-
K.dev()¶ standard deviation
For details, see
q.devand dev on code.kx.com.
-
K.differ()¶ flag differences in consecutive pairs
For details, see
q.differand differ on code.kx.com.
-
K.distinct()¶ unique items
For details, see
q.distinctand distinct on code.kx.com.
-
K.div()¶ integer division
For details, see
q.divand div on code.kx.com.
-
K.dsave()¶ save global tables to disk
For details, see
q.dsaveand dsave on code.kx.com.
-
K.ej()¶ equi-join
For details, see
q.ejand ej on code.kx.com.
-
K.ema()¶ exponentially-weighted moving average
For details, see
q.emaand ema on code.kx.com.
-
K.ema() exponentially-weighted moving average
For details, see
q.emaand ema on code.kx.com.
-
K.enlist()¶ arguments as a list
For details, see
q.enlistand enlist on code.kx.com.
-
K.eval()¶ evaluate a parse tree
For details, see
q.evaland eval on code.kx.com.
-
K.except_()¶ left argument without items in right argument
For details, see
q.except_and except on code.kx.com.
-
K.exp()¶ power of e
For details, see
q.expand exp on code.kx.com.
-
K.fby()¶ filter-by
For details, see
q.fbyand fby on code.kx.com.
-
K.fills()¶ forward-fill nulls
For details, see
q.fillsand fills on code.kx.com.
-
K.first()¶ first item
For details, see
q.firstand first on code.kx.com.
-
K.fkeys()¶ foreign-key columns mapped to their tables
For details, see
q.fkeysand fkeys on code.kx.com.
-
K.flip()¶ transpose
For details, see
q.flipand flip on code.kx.com.
-
K.floor()¶ greatest integer less than argument
For details, see
q.floorand floor on code.kx.com.
-
K.get()¶ get
For details, see
q.getand get on code.kx.com.
-
K.getenv()¶ value of an environment variable
For details, see
q.getenvand getenv on code.kx.com.
-
K.group()¶ dictionary of distinct items
For details, see
q.groupand group on code.kx.com.
-
K.gtime()¶ UTC timestamp
For details, see
q.gtimeand gtime on code.kx.com.
-
K.hclose()¶ close a file or process
For details, see
q.hcloseand hclose on code.kx.com.
-
K.hcount()¶ size of a file
For details, see
q.hcountand hcount on code.kx.com.
-
K.hdel()¶ delete a file
For details, see
q.hdeland hdel on code.kx.com.
-
K.hopen()¶ open a file
For details, see
q.hopenand hopen on code.kx.com.
-
K.hsym()¶ convert symbol to filename or IP address
For details, see
q.hsymand hsym on code.kx.com.
-
K.iasc()¶ indices of ascending sort
For details, see
q.iascand iasc on code.kx.com.
-
K.idesc()¶ indices of descending sort
For details, see
q.idescand idesc on code.kx.com.
-
K.ij()¶ inner join
For details, see
q.ijand ij on code.kx.com.
-
K.ijf()¶ The ijf function.
For details, see
q.ijfand ijf on code.kx.com.
-
K.in_()¶ membership
For details, see
q.in_and in on code.kx.com.
-
K.insert()¶ append records to a table
For details, see
q.insertand insert on code.kx.com.
-
K.inter()¶ items common to both arguments
For details, see
q.interand inter on code.kx.com.
-
K.inv()¶ matrix inverse
For details, see
q.invand inv on code.kx.com.
-
K.key()¶ key
For details, see
q.keyand key on code.kx.com.
-
K.keys() names of a table’s columns
For details, see
q.keysand keys on code.kx.com.
-
K.last()¶ last item
For details, see
q.lastand last on code.kx.com.
-
K.like()¶ pattern matching
For details, see
q.likeand like on code.kx.com.
-
K.lj()¶ left join
For details, see
q.ljand lj on code.kx.com.
-
K.ljf()¶ left join
For details, see
q.ljfand ljf on code.kx.com.
-
K.load()¶ load binary data
For details, see
q.loadand load on code.kx.com.
-
K.log()¶ natural logarithm
For details, see
q.logand log on code.kx.com.
-
K.lower()¶ lower case
For details, see
q.lowerand lower on code.kx.com.
-
K.lsq()¶ least squares matrix divide
For details, see
q.lsqand lsq on code.kx.com.
-
K.ltime()¶ local timestamp
For details, see
q.ltimeand ltime on code.kx.com.
-
K.ltrim()¶ function remove leading spaces
For details, see
q.ltrimand ltrim on code.kx.com.
-
K.mavg()¶ moving average
For details, see
q.mavgand mavg on code.kx.com.
-
K.max()¶ maximum
For details, see
q.maxand max on code.kx.com.
-
K.maxs()¶ maxima of preceding items
For details, see
q.maxsand maxs on code.kx.com.
-
K.mcount()¶ moving count
For details, see
q.mcountand mcount on code.kx.com.
-
K.md5()¶ MD5 hash
For details, see
q.md5and md5 on code.kx.com.
-
K.mdev()¶ moving deviation
For details, see
q.mdevand mdev on code.kx.com.
-
K.med()¶ median
For details, see
q.medand med on code.kx.com.
-
K.meta()¶ metadata of a table
For details, see
q.metaand meta on code.kx.com.
-
K.min()¶ minimum
For details, see
q.minand min on code.kx.com.
-
K.mins()¶ minimum of preceding items
For details, see
q.minsand mins on code.kx.com.
-
K.mmax()¶ moving maxima
For details, see
q.mmaxand mmax on code.kx.com.
-
K.mmin()¶ moving minima
For details, see
q.mminand mmin on code.kx.com.
-
K.mmu()¶ mmu
For details, see
q.mmuand mmu on code.kx.com.
-
K.mod()¶ remainder
For details, see
q.modand mod on code.kx.com.
-
K.msum()¶ moving sum
For details, see
q.msumand msum on code.kx.com.
-
K.neg()¶ negate
For details, see
q.negand neg on code.kx.com.
-
K.next()¶ next items
For details, see
q.nextand next on code.kx.com.
-
K.not_()¶ not
For details, see
q.not_and not on code.kx.com.
-
K.null()¶ null
For details, see
q.nulland null on code.kx.com.
-
K.or_()¶ or
For details, see
q.or_and or on code.kx.com.
-
K.parse()¶ parse a string
For details, see
q.parseand parse on code.kx.com.
-
K.peach()¶ peach
For details, see
q.peachand peach on code.kx.com.
-
K.pj()¶ plus join
For details, see
q.pjand pj on code.kx.com.
-
K.prd()¶ product
For details, see
q.prdand prd on code.kx.com.
-
K.prds()¶ cumulative products
For details, see
q.prdsand prds on code.kx.com.
-
K.prev()¶ previous items
For details, see
q.prevand prev on code.kx.com.
-
K.prior()¶ prior
For details, see
q.priorand prior on code.kx.com.
-
K.rand()¶ random number
For details, see
q.randand rand on code.kx.com.
-
K.rank()¶ grade up
For details, see
q.rankand rank on code.kx.com.
-
K.ratios()¶ ratios of consecutive pairs
For details, see
q.ratiosand ratios on code.kx.com.
-
K.raze()¶ join items
For details, see
q.razeand raze on code.kx.com.
-
K.read0()¶ read file as lines
For details, see
q.read0and read0 on code.kx.com.
-
K.read1()¶ read file as bytes
For details, see
q.read1and read1 on code.kx.com.
-
K.reciprocal()¶ reciprocal of a number
For details, see
q.reciprocaland reciprocal on code.kx.com.
-
K.reval()¶ variation of eval
For details, see
q.revaland reval on code.kx.com.
-
K.reverse()¶ reverse the order of items
For details, see
q.reverseand reverse on code.kx.com.
-
K.rload()¶ load a splayed table
For details, see
q.rloadand rload on code.kx.com.
-
K.rotate()¶ rotate items
For details, see
q.rotateand rotate on code.kx.com.
-
K.rsave()¶ rsave
For details, see
q.rsaveand rsave on code.kx.com.
-
K.rtrim()¶ remove trailing spaces
For details, see
q.rtrimand rtrim on code.kx.com.
-
K.save()¶ save global data to file
For details, see
q.saveand save on code.kx.com.
-
K.scov()¶ statistical covariance
For details, see
q.scovand scov on code.kx.com.
-
K.scov() statistical covariance
For details, see
q.scovand scov on code.kx.com.
-
K.sdev()¶ statistical standard deviation
For details, see
q.sdevand sdev on code.kx.com.
-
K.sdev() statistical standard deviation
For details, see
q.sdevand sdev on code.kx.com.
-
K.set()¶ set
For details, see
q.setand set on code.kx.com.
-
K.setenv()¶ set an environment variable
For details, see
q.setenvand setenv on code.kx.com.
-
K.show() format to the console
For details, see
q.showand show on code.kx.com.
-
K.signum()¶ sign of its argument/s
For details, see
q.signumand signum on code.kx.com.
-
K.sin()¶ sine
For details, see
q.sinand sin on code.kx.com.
-
K.sqrt()¶ square root
For details, see
q.sqrtand sqrt on code.kx.com.
-
K.ss()¶ string search
For details, see
q.ssand ss on code.kx.com.
-
K.ssr()¶ string search and replace
For details, see
q.ssrand ssr on code.kx.com.
-
K.string()¶ cast to string
For details, see
q.stringand string on code.kx.com.
-
K.sublist()¶ sublist of a list
For details, see
q.sublistand sublist on code.kx.com.
-
K.sum()¶ sum of a list
For details, see
q.sumand sum on code.kx.com.
-
K.sums()¶ cumulative sums of a list
For details, see
q.sumsand sums on code.kx.com.
-
K.sv()¶ consolidate
For details, see
q.svand sv on code.kx.com.
-
K.svar()¶ statistical variance
For details, see
q.svarand svar on code.kx.com.
-
K.svar() statistical variance
For details, see
q.svarand svar on code.kx.com.
-
K.system()¶ system
For details, see
q.systemand system on code.kx.com.
-
K.tables()¶ sorted list of tables
For details, see
q.tablesand tables on code.kx.com.
-
K.tan()¶ tangent
For details, see
q.tanand tan on code.kx.com.
-
K.til()¶ integers up to x
For details, see
q.tiland til on code.kx.com.
-
K.trim()¶ remove leading and trailing spaces
For details, see
q.trimand trim on code.kx.com.
-
K.type()¶ data type
For details, see
q.typeand type on code.kx.com.
-
K.uj()¶ union join
For details, see
q.ujand uj on code.kx.com.
-
K.ujf()¶ The ujf function.
For details, see
q.ujfand ujf on code.kx.com.
-
K.ungroup()¶ flattened table
For details, see
q.ungroupand ungroup on code.kx.com.
-
K.union()¶ distinct items of combination of two lists
For details, see
q.unionand union on code.kx.com.
-
K.upper()¶ upper-case
For details, see
q.upperand upper on code.kx.com.
-
K.upsert()¶ add table records
For details, see
q.upsertand upsert on code.kx.com.
-
K.value()¶ value
For details, see
q.valueand value on code.kx.com.
-
K.var()¶ variance
For details, see
q.varand var on code.kx.com.
-
K.view()¶ definition of a dependency
For details, see
q.viewand view on code.kx.com.
-
K.views()¶ list of defined views
For details, see
q.viewsand views on code.kx.com.
-
K.vs()¶ split
For details, see
q.vsand vs on code.kx.com.
-
K.wavg()¶ weighted average
For details, see
q.wavgand wavg on code.kx.com.
-
K.where()¶ replicated items
For details, see
q.whereand where on code.kx.com.
-
K.within()¶ flag items within range
For details, see
q.withinand within on code.kx.com.
-
K.wj()¶ window join
For details, see
q.wjand wj on code.kx.com.
-
K.wj1()¶ window join
For details, see
q.wj1and wj1 on code.kx.com.
-
K.wsum()¶ weighted sum
For details, see
q.wsumand wsum on code.kx.com.
-
K.ww()¶ The ww function.
For details, see
q.wwand ww on code.kx.com.
-
K.xasc()¶ table sorted ascending by columns
For details, see
q.xascand xasc on code.kx.com.
-
K.xbar()¶ interval bar
For details, see
q.xbarand xbar on code.kx.com.
-
K.xcol()¶ rename table columns
For details, see
q.xcoland xcol on code.kx.com.
-
K.xcols()¶ re-order table columns
For details, see
q.xcolsand xcols on code.kx.com.
-
K.xdesc()¶ table sorted descending by columns
For details, see
q.xdescand xdesc on code.kx.com.
-
K.xexp()¶ raised to a power
For details, see
q.xexpand xexp on code.kx.com.
-
K.xgroup()¶ table grouped by keys
For details, see
q.xgroupand xgroup on code.kx.com.
-
K.xkey()¶ set primary keys of a table
For details, see
q.xkeyand xkey on code.kx.com.
-
K.xlog()¶ base-x logarithm
For details, see
q.xlogand xlog on code.kx.com.
-
K.xprev()¶ previous items
For details, see
q.xprevand xprev on code.kx.com.
-
K.xrank()¶ items assigned to buckets
For details, see
q.xrankand xrank on code.kx.com.
namespace q¶
-
pyq.q¶
-
q.__call__(m=None, *args)¶ Execute q code.
When called without arguments in an interactive session,
q()presents aq)prompt where user can interact with kdb+ using q language commands.The first argument to that may be given to
q()should be a string containing a q language expression. If that expression evaluates to a function, the arguments to this function can be provided as additional arguments toq().For example, the following passes a list and a number to the q
?(find) function:>>> q('?', [1, 2, 3], 2) k('1')
Q functions¶
-
q.abs()¶ absolute value The abs function computes the absolute value of its argument. Null is returned if the argument is null.
>>> q.abs([-1, 0, 1, None]) k('1 0 1 0N')
See also abs on code.kx.com.
-
q.acos()¶ arc cosine
See also acos on code.kx.com.
-
q.aj()¶ as-of join
See also aj on code.kx.com.
-
q.aj0()¶ as-of join
See also aj on code.kx.com.
-
q.all()¶ all nonzero
See also all on code.kx.com.
-
q.and_()¶ and
See also and on code.kx.com.
-
q.any()¶ any item is non-zero
See also any on code.kx.com.
-
q.asc()¶ ascending sort
See also asc on code.kx.com.
-
q.asin()¶ arc sine
See also asin on code.kx.com.
-
q.asof()¶ as-of operator
See also asof on code.kx.com.
-
q.atan()¶ arc tangent
See also atan on code.kx.com.
-
q.attr()¶ attributes
See also attr on code.kx.com.
-
q.avg()¶ arithmetic mean
See also avg on code.kx.com.
-
q.avgs()¶ running averages
See also avgs on code.kx.com.
-
q.bin()¶ binary search
See also bin on code.kx.com.
-
q.binr()¶ binary search
See also bin on code.kx.com.
-
q.ceiling()¶ lowest integer above
See also ceiling on code.kx.com.
-
q.cols()¶ column names of a table
See also cols on code.kx.com.
-
q.cor()¶ correlation
See also cor on code.kx.com.
-
q.cos()¶ cosine
See also cos on code.kx.com.
-
q.count()¶ number of items
See also count on code.kx.com.
-
q.cov()¶ statistical covariance
See also cov on code.kx.com.
-
q.cross()¶ cross product
See also cross on code.kx.com.
-
q.csv()¶ comma delimiter
See also csv on code.kx.com.
-
q.cut()¶ cut
See also cut on code.kx.com.
-
q.deltas()¶ differences between consecutive pairs
See also deltas on code.kx.com.
-
q.desc()¶ descending sort
See also desc on code.kx.com.
-
q.dev()¶ standard deviation
See also dev on code.kx.com.
-
q.differ()¶ flag differences in consecutive pairs
See also differ on code.kx.com.
-
q.distinct()¶ unique items
See also distinct on code.kx.com.
-
q.div()¶ integer division
See also div on code.kx.com.
-
q.dsave()¶ save global tables to disk
See also dsave on code.kx.com.
-
q.ej()¶ equi-join
See also ej on code.kx.com.
-
q.ema()¶ exponentially-weighted moving average
See also ema on code.kx.com.
-
q.ema() exponentially-weighted moving average
See also ema on code.kx.com.
-
q.enlist()¶ arguments as a list
See also enlist on code.kx.com.
-
q.eval()¶ evaluate a parse tree
See also eval on code.kx.com.
-
q.except_()¶ left argument without items in right argument
See also except on code.kx.com.
-
q.exp()¶ power of e
See also exp on code.kx.com.
-
q.fby()¶ filter-by
See also fby on code.kx.com.
-
q.fills()¶ forward-fill nulls
See also fills on code.kx.com.
-
q.first()¶ first item
See also first on code.kx.com.
-
q.fkeys()¶ foreign-key columns mapped to their tables
See also fkeys on code.kx.com.
-
q.flip()¶ transpose
See also flip on code.kx.com.
-
q.floor()¶ greatest integer less than argument
See also floor on code.kx.com.
-
q.get()¶ get
See also get on code.kx.com.
-
q.getenv()¶ value of an environment variable
See also getenv on code.kx.com.
-
q.group()¶ dictionary of distinct items
See also group on code.kx.com.
-
q.gtime()¶ UTC timestamp
See also gtime on code.kx.com.
-
q.hclose()¶ close a file or process
See also hclose on code.kx.com.
-
q.hcount()¶ size of a file
See also hcount on code.kx.com.
-
q.hdel()¶ delete a file
See also hdel on code.kx.com.
-
q.hopen()¶ open a file
See also hopen on code.kx.com.
-
q.hsym()¶ convert symbol to filename or IP address
See also hsym on code.kx.com.
-
q.iasc()¶ indices of ascending sort
See also iasc on code.kx.com.
-
q.idesc()¶ indices of descending sort
See also idesc on code.kx.com.
-
q.ij()¶ inner join
See also ij on code.kx.com.
-
q.ijf()¶ The ijf function.
See also ijf on code.kx.com.
-
q.in_()¶ membership
See also in on code.kx.com.
-
q.insert()¶ append records to a table
See also insert on code.kx.com.
-
q.inter()¶ items common to both arguments
See also inter on code.kx.com.
-
q.inv()¶ matrix inverse
See also inv on code.kx.com.
-
q.key()¶ key
See also key on code.kx.com.
-
q.keys()¶ names of a table’s columns
See also keys on code.kx.com.
-
q.last()¶ last item
See also last on code.kx.com.
-
q.like()¶ pattern matching
See also like on code.kx.com.
-
q.lj()¶ left join
See also lj on code.kx.com.
-
q.ljf()¶ left join
See also ljf on code.kx.com.
-
q.load()¶ load binary data
See also load on code.kx.com.
-
q.log()¶ natural logarithm
See also log on code.kx.com.
-
q.lower()¶ lower case
See also lower on code.kx.com.
-
q.lsq()¶ least squares matrix divide
See also lsq on code.kx.com.
-
q.ltime()¶ local timestamp
See also ltime on code.kx.com.
-
q.ltrim()¶ function remove leading spaces
See also ltrim on code.kx.com.
-
q.mavg()¶ moving average
See also mavg on code.kx.com.
-
q.max()¶ maximum
See also max on code.kx.com.
-
q.maxs()¶ maxima of preceding items
See also maxs on code.kx.com.
-
q.mcount()¶ moving count
See also mcount on code.kx.com.
-
q.md5()¶ MD5 hash
See also md5 on code.kx.com.
-
q.mdev()¶ moving deviation
See also mdev on code.kx.com.
-
q.med()¶ median
See also med on code.kx.com.
-
q.meta()¶ metadata of a table
See also meta on code.kx.com.
-
q.min()¶ minimum
See also min on code.kx.com.
-
q.mins()¶ minimum of preceding items
See also mins on code.kx.com.
-
q.mmax()¶ moving maxima
See also mmax on code.kx.com.
-
q.mmin()¶ moving minima
See also mmin on code.kx.com.
-
q.mmu()¶ mmu
See also mmu on code.kx.com.
-
q.mod()¶ remainder
See also mod on code.kx.com.
-
q.msum()¶ moving sum
See also msum on code.kx.com.
-
q.neg()¶ negate
See also neg on code.kx.com.
-
q.next()¶ next items
See also next on code.kx.com.
-
q.not_()¶ not
See also not on code.kx.com.
-
q.null()¶ null
See also null on code.kx.com.
-
q.or_()¶ or
See also or on code.kx.com.
-
q.parse()¶ parse a string
See also parse on code.kx.com.
-
q.peach()¶ peach
See also peach on code.kx.com.
-
q.pj()¶ plus join
See also pj on code.kx.com.
-
q.prd()¶ product
See also prd on code.kx.com.
-
q.prds()¶ cumulative products
See also prds on code.kx.com.
-
q.prev()¶ previous items
See also prev on code.kx.com.
-
q.prior()¶ prior
See also prior on code.kx.com.
-
q.rand()¶ random number
See also rand on code.kx.com.
-
q.rank()¶ grade up
See also rank on code.kx.com.
-
q.ratios()¶ ratios of consecutive pairs
See also ratios on code.kx.com.
-
q.raze()¶ join items
See also raze on code.kx.com.
-
q.read0()¶ read file as lines
See also read0 on code.kx.com.
-
q.read1()¶ read file as bytes
See also read1 on code.kx.com.
-
q.reciprocal()¶ reciprocal of a number
See also reciprocal on code.kx.com.
-
q.reval()¶ variation of eval
See also reval on code.kx.com.
-
q.reverse()¶ reverse the order of items
See also reverse on code.kx.com.
-
q.rload()¶ load a splayed table
See also rload on code.kx.com.
-
q.rotate()¶ rotate items
See also rotate on code.kx.com.
-
q.rsave()¶ rsave
See also rsave on code.kx.com.
-
q.rtrim()¶ remove trailing spaces
See also rtrim on code.kx.com.
-
q.save()¶ save global data to file
See also save on code.kx.com.
-
q.scov()¶ statistical covariance
See also scov on code.kx.com.
-
q.scov() statistical covariance
See also scov on code.kx.com.
-
q.sdev()¶ statistical standard deviation
See also sdev on code.kx.com.
-
q.sdev() statistical standard deviation
See also sdev on code.kx.com.
-
q.set()¶ set
See also set on code.kx.com.
-
q.setenv()¶ set an environment variable
See also setenv on code.kx.com.
-
q.show()¶ format to the console
See also show on code.kx.com.
-
q.signum()¶ sign of its argument/s
See also signum on code.kx.com.
-
q.sin()¶ sine
See also sin on code.kx.com.
-
q.sqrt()¶ square root
See also sqrt on code.kx.com.
-
q.ss()¶ string search
See also ss on code.kx.com.
-
q.ssr()¶ string search and replace
See also ssr on code.kx.com.
-
q.string()¶ cast to string
See also string on code.kx.com.
-
q.sublist()¶ sublist of a list
See also sublist on code.kx.com.
-
q.sum()¶ sum of a list
See also sum on code.kx.com.
-
q.sums()¶ cumulative sums of a list
See also sums on code.kx.com.
-
q.sv()¶ consolidate
See also sv on code.kx.com.
-
q.svar()¶ statistical variance
See also svar on code.kx.com.
-
q.svar() statistical variance
See also svar on code.kx.com.
-
q.system()¶ system
See also system on code.kx.com.
-
q.tables()¶ sorted list of tables
See also tables on code.kx.com.
-
q.tan()¶ tangent
See also tan on code.kx.com.
-
q.til()¶ integers up to x
See also til on code.kx.com.
-
q.trim()¶ remove leading and trailing spaces
See also trim on code.kx.com.
-
q.type()¶ data type
See also type on code.kx.com.
-
q.uj()¶ union join
See also uj on code.kx.com.
-
q.ujf()¶ The ujf function.
See also ujf on code.kx.com.
-
q.ungroup()¶ flattened table
See also ungroup on code.kx.com.
-
q.union()¶ distinct items of combination of two lists
See also union on code.kx.com.
-
q.upper()¶ upper-case
See also upper on code.kx.com.
-
q.upsert()¶ add table records
See also upsert on code.kx.com.
-
q.value()¶ value
See also value on code.kx.com.
-
q.var()¶ variance
See also var on code.kx.com.
-
q.view()¶ definition of a dependency
See also view on code.kx.com.
-
q.views()¶ list of defined views
See also views on code.kx.com.
-
q.vs()¶ split
See also vs on code.kx.com.
-
q.wavg()¶ weighted average
See also wavg on code.kx.com.
-
q.where()¶ replicated items
See also where on code.kx.com.
-
q.within()¶ flag items within range
See also within on code.kx.com.
-
q.wj()¶ window join
See also wj on code.kx.com.
-
q.wj1()¶ window join
See also wj1 on code.kx.com.
-
q.wsum()¶ weighted sum
See also wsum on code.kx.com.
-
q.ww()¶ The ww function.
See also ww on code.kx.com.
-
q.xasc()¶ table sorted ascending by columns
See also xasc on code.kx.com.
-
q.xbar()¶ interval bar
See also xbar on code.kx.com.
-
q.xcol()¶ rename table columns
See also xcol on code.kx.com.
-
q.xcols()¶ re-order table columns
See also xcols on code.kx.com.
-
q.xdesc()¶ table sorted descending by columns
See also xdesc on code.kx.com.
-
q.xexp()¶ raised to a power
See also xexp on code.kx.com.
-
q.xgroup()¶ table grouped by keys
See also xgroup on code.kx.com.
-
q.xkey()¶ set primary keys of a table
See also xkey on code.kx.com.
-
q.xlog()¶ base-x logarithm
See also xlog on code.kx.com.
-
q.xprev()¶ previous items
See also xprev on code.kx.com.
-
q.xrank()¶ items assigned to buckets
See also xrank on code.kx.com.
-
pyq.kerr¶ alias of
error