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.abs
and abs on code.kx.com.
-
K.
acos
()¶ arc cosine
For details, see
q.acos
and acos on code.kx.com.
-
K.
aj
()¶ as-of join
For details, see
q.aj
and aj on code.kx.com.
-
K.
aj0
()¶ as-of join
For details, see
q.aj0
and aj on code.kx.com.
-
K.
all
()¶ all nonzero
For details, see
q.all
and 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.any
and any on code.kx.com.
-
K.
asc
()¶ ascending sort
For details, see
q.asc
and asc on code.kx.com.
-
K.
asin
()¶ arc sine
For details, see
q.asin
and asin on code.kx.com.
-
K.
asof
()¶ as-of operator
For details, see
q.asof
and asof on code.kx.com.
-
K.
atan
()¶ arc tangent
For details, see
q.atan
and atan on code.kx.com.
-
K.
attr
()¶ attributes
For details, see
q.attr
and attr on code.kx.com.
-
K.
avg
()¶ arithmetic mean
For details, see
q.avg
and avg on code.kx.com.
-
K.
avgs
()¶ running averages
For details, see
q.avgs
and avgs on code.kx.com.
-
K.
bin
()¶ binary search
For details, see
q.bin
and bin on code.kx.com.
-
K.
binr
()¶ binary search
For details, see
q.binr
and bin on code.kx.com.
-
K.
ceiling
()¶ lowest integer above
For details, see
q.ceiling
and ceiling on code.kx.com.
-
K.
cols
()¶ column names of a table
For details, see
q.cols
and cols on code.kx.com.
-
K.
cor
()¶ correlation
For details, see
q.cor
and cor on code.kx.com.
-
K.
cos
()¶ cosine
For details, see
q.cos
and cos on code.kx.com.
-
K.
count
()¶ number of items
For details, see
q.count
and count on code.kx.com.
-
K.
cov
()¶ statistical covariance
For details, see
q.cov
and cov on code.kx.com.
-
K.
cross
()¶ cross product
For details, see
q.cross
and cross on code.kx.com.
-
K.
csv
()¶ comma delimiter
For details, see
q.csv
and csv on code.kx.com.
-
K.
cut
()¶ cut
For details, see
q.cut
and cut on code.kx.com.
-
K.
deltas
()¶ differences between consecutive pairs
For details, see
q.deltas
and deltas on code.kx.com.
-
K.
desc
()¶ descending sort
For details, see
q.desc
and desc on code.kx.com.
-
K.
dev
()¶ standard deviation
For details, see
q.dev
and dev on code.kx.com.
-
K.
differ
()¶ flag differences in consecutive pairs
For details, see
q.differ
and differ on code.kx.com.
-
K.
distinct
()¶ unique items
For details, see
q.distinct
and distinct on code.kx.com.
-
K.
div
()¶ integer division
For details, see
q.div
and div on code.kx.com.
-
K.
dsave
()¶ save global tables to disk
For details, see
q.dsave
and dsave on code.kx.com.
-
K.
ej
()¶ equi-join
For details, see
q.ej
and ej on code.kx.com.
-
K.
ema
()¶ exponentially-weighted moving average
For details, see
q.ema
and ema on code.kx.com.
-
K.
ema
() exponentially-weighted moving average
For details, see
q.ema
and ema on code.kx.com.
-
K.
enlist
()¶ arguments as a list
For details, see
q.enlist
and enlist on code.kx.com.
-
K.
eval
()¶ evaluate a parse tree
For details, see
q.eval
and 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.exp
and exp on code.kx.com.
-
K.
fby
()¶ filter-by
For details, see
q.fby
and fby on code.kx.com.
-
K.
fills
()¶ forward-fill nulls
For details, see
q.fills
and fills on code.kx.com.
-
K.
first
()¶ first item
For details, see
q.first
and first on code.kx.com.
-
K.
fkeys
()¶ foreign-key columns mapped to their tables
For details, see
q.fkeys
and fkeys on code.kx.com.
-
K.
flip
()¶ transpose
For details, see
q.flip
and flip on code.kx.com.
-
K.
floor
()¶ greatest integer less than argument
For details, see
q.floor
and floor on code.kx.com.
-
K.
get
()¶ get
For details, see
q.get
and get on code.kx.com.
-
K.
getenv
()¶ value of an environment variable
For details, see
q.getenv
and getenv on code.kx.com.
-
K.
group
()¶ dictionary of distinct items
For details, see
q.group
and group on code.kx.com.
-
K.
gtime
()¶ UTC timestamp
For details, see
q.gtime
and gtime on code.kx.com.
-
K.
hclose
()¶ close a file or process
For details, see
q.hclose
and hclose on code.kx.com.
-
K.
hcount
()¶ size of a file
For details, see
q.hcount
and hcount on code.kx.com.
-
K.
hdel
()¶ delete a file
For details, see
q.hdel
and hdel on code.kx.com.
-
K.
hopen
()¶ open a file
For details, see
q.hopen
and hopen on code.kx.com.
-
K.
hsym
()¶ convert symbol to filename or IP address
For details, see
q.hsym
and hsym on code.kx.com.
-
K.
iasc
()¶ indices of ascending sort
For details, see
q.iasc
and iasc on code.kx.com.
-
K.
idesc
()¶ indices of descending sort
For details, see
q.idesc
and idesc on code.kx.com.
-
K.
ij
()¶ inner join
For details, see
q.ij
and ij on code.kx.com.
-
K.
ijf
()¶ The ijf function.
For details, see
q.ijf
and 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.insert
and insert on code.kx.com.
-
K.
inter
()¶ items common to both arguments
For details, see
q.inter
and inter on code.kx.com.
-
K.
inv
()¶ matrix inverse
For details, see
q.inv
and inv on code.kx.com.
-
K.
key
()¶ key
For details, see
q.key
and key on code.kx.com.
-
K.
keys
() names of a table’s columns
For details, see
q.keys
and keys on code.kx.com.
-
K.
last
()¶ last item
For details, see
q.last
and last on code.kx.com.
-
K.
like
()¶ pattern matching
For details, see
q.like
and like on code.kx.com.
-
K.
lj
()¶ left join
For details, see
q.lj
and lj on code.kx.com.
-
K.
ljf
()¶ left join
For details, see
q.ljf
and ljf on code.kx.com.
-
K.
load
()¶ load binary data
For details, see
q.load
and load on code.kx.com.
-
K.
log
()¶ natural logarithm
For details, see
q.log
and log on code.kx.com.
-
K.
lower
()¶ lower case
For details, see
q.lower
and lower on code.kx.com.
-
K.
lsq
()¶ least squares matrix divide
For details, see
q.lsq
and lsq on code.kx.com.
-
K.
ltime
()¶ local timestamp
For details, see
q.ltime
and ltime on code.kx.com.
-
K.
ltrim
()¶ function remove leading spaces
For details, see
q.ltrim
and ltrim on code.kx.com.
-
K.
mavg
()¶ moving average
For details, see
q.mavg
and mavg on code.kx.com.
-
K.
max
()¶ maximum
For details, see
q.max
and max on code.kx.com.
-
K.
maxs
()¶ maxima of preceding items
For details, see
q.maxs
and maxs on code.kx.com.
-
K.
mcount
()¶ moving count
For details, see
q.mcount
and mcount on code.kx.com.
-
K.
md5
()¶ MD5 hash
For details, see
q.md5
and md5 on code.kx.com.
-
K.
mdev
()¶ moving deviation
For details, see
q.mdev
and mdev on code.kx.com.
-
K.
med
()¶ median
For details, see
q.med
and med on code.kx.com.
-
K.
meta
()¶ metadata of a table
For details, see
q.meta
and meta on code.kx.com.
-
K.
min
()¶ minimum
For details, see
q.min
and min on code.kx.com.
-
K.
mins
()¶ minimum of preceding items
For details, see
q.mins
and mins on code.kx.com.
-
K.
mmax
()¶ moving maxima
For details, see
q.mmax
and mmax on code.kx.com.
-
K.
mmin
()¶ moving minima
For details, see
q.mmin
and mmin on code.kx.com.
-
K.
mmu
()¶ mmu
For details, see
q.mmu
and mmu on code.kx.com.
-
K.
mod
()¶ remainder
For details, see
q.mod
and mod on code.kx.com.
-
K.
msum
()¶ moving sum
For details, see
q.msum
and msum on code.kx.com.
-
K.
neg
()¶ negate
For details, see
q.neg
and neg on code.kx.com.
-
K.
next
()¶ next items
For details, see
q.next
and 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.null
and 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.parse
and parse on code.kx.com.
-
K.
peach
()¶ peach
For details, see
q.peach
and peach on code.kx.com.
-
K.
pj
()¶ plus join
For details, see
q.pj
and pj on code.kx.com.
-
K.
prd
()¶ product
For details, see
q.prd
and prd on code.kx.com.
-
K.
prds
()¶ cumulative products
For details, see
q.prds
and prds on code.kx.com.
-
K.
prev
()¶ previous items
For details, see
q.prev
and prev on code.kx.com.
-
K.
prior
()¶ prior
For details, see
q.prior
and prior on code.kx.com.
-
K.
rand
()¶ random number
For details, see
q.rand
and rand on code.kx.com.
-
K.
rank
()¶ grade up
For details, see
q.rank
and rank on code.kx.com.
-
K.
ratios
()¶ ratios of consecutive pairs
For details, see
q.ratios
and ratios on code.kx.com.
-
K.
raze
()¶ join items
For details, see
q.raze
and raze on code.kx.com.
-
K.
read0
()¶ read file as lines
For details, see
q.read0
and read0 on code.kx.com.
-
K.
read1
()¶ read file as bytes
For details, see
q.read1
and read1 on code.kx.com.
-
K.
reciprocal
()¶ reciprocal of a number
For details, see
q.reciprocal
and reciprocal on code.kx.com.
-
K.
reval
()¶ variation of eval
For details, see
q.reval
and reval on code.kx.com.
-
K.
reverse
()¶ reverse the order of items
For details, see
q.reverse
and reverse on code.kx.com.
-
K.
rload
()¶ load a splayed table
For details, see
q.rload
and rload on code.kx.com.
-
K.
rotate
()¶ rotate items
For details, see
q.rotate
and rotate on code.kx.com.
-
K.
rsave
()¶ rsave
For details, see
q.rsave
and rsave on code.kx.com.
-
K.
rtrim
()¶ remove trailing spaces
For details, see
q.rtrim
and rtrim on code.kx.com.
-
K.
save
()¶ save global data to file
For details, see
q.save
and save on code.kx.com.
-
K.
scov
()¶ statistical covariance
For details, see
q.scov
and scov on code.kx.com.
-
K.
scov
() statistical covariance
For details, see
q.scov
and scov on code.kx.com.
-
K.
sdev
()¶ statistical standard deviation
For details, see
q.sdev
and sdev on code.kx.com.
-
K.
sdev
() statistical standard deviation
For details, see
q.sdev
and sdev on code.kx.com.
-
K.
set
()¶ set
For details, see
q.set
and set on code.kx.com.
-
K.
setenv
()¶ set an environment variable
For details, see
q.setenv
and setenv on code.kx.com.
-
K.
show
() format to the console
For details, see
q.show
and show on code.kx.com.
-
K.
signum
()¶ sign of its argument/s
For details, see
q.signum
and signum on code.kx.com.
-
K.
sin
()¶ sine
For details, see
q.sin
and sin on code.kx.com.
-
K.
sqrt
()¶ square root
For details, see
q.sqrt
and sqrt on code.kx.com.
-
K.
ss
()¶ string search
For details, see
q.ss
and ss on code.kx.com.
-
K.
ssr
()¶ string search and replace
For details, see
q.ssr
and ssr on code.kx.com.
-
K.
string
()¶ cast to string
For details, see
q.string
and string on code.kx.com.
-
K.
sublist
()¶ sublist of a list
For details, see
q.sublist
and sublist on code.kx.com.
-
K.
sum
()¶ sum of a list
For details, see
q.sum
and sum on code.kx.com.
-
K.
sums
()¶ cumulative sums of a list
For details, see
q.sums
and sums on code.kx.com.
-
K.
sv
()¶ consolidate
For details, see
q.sv
and sv on code.kx.com.
-
K.
svar
()¶ statistical variance
For details, see
q.svar
and svar on code.kx.com.
-
K.
svar
() statistical variance
For details, see
q.svar
and svar on code.kx.com.
-
K.
system
()¶ system
For details, see
q.system
and system on code.kx.com.
-
K.
tables
()¶ sorted list of tables
For details, see
q.tables
and tables on code.kx.com.
-
K.
tan
()¶ tangent
For details, see
q.tan
and tan on code.kx.com.
-
K.
til
()¶ integers up to x
For details, see
q.til
and til on code.kx.com.
-
K.
trim
()¶ remove leading and trailing spaces
For details, see
q.trim
and trim on code.kx.com.
-
K.
type
()¶ data type
For details, see
q.type
and type on code.kx.com.
-
K.
uj
()¶ union join
For details, see
q.uj
and uj on code.kx.com.
-
K.
ujf
()¶ The ujf function.
For details, see
q.ujf
and ujf on code.kx.com.
-
K.
ungroup
()¶ flattened table
For details, see
q.ungroup
and ungroup on code.kx.com.
-
K.
union
()¶ distinct items of combination of two lists
For details, see
q.union
and union on code.kx.com.
-
K.
upper
()¶ upper-case
For details, see
q.upper
and upper on code.kx.com.
-
K.
upsert
()¶ add table records
For details, see
q.upsert
and upsert on code.kx.com.
-
K.
value
()¶ value
For details, see
q.value
and value on code.kx.com.
-
K.
var
()¶ variance
For details, see
q.var
and var on code.kx.com.
-
K.
view
()¶ definition of a dependency
For details, see
q.view
and view on code.kx.com.
-
K.
views
()¶ list of defined views
For details, see
q.views
and views on code.kx.com.
-
K.
vs
()¶ split
For details, see
q.vs
and vs on code.kx.com.
-
K.
wavg
()¶ weighted average
For details, see
q.wavg
and wavg on code.kx.com.
-
K.
where
()¶ replicated items
For details, see
q.where
and where on code.kx.com.
-
K.
within
()¶ flag items within range
For details, see
q.within
and within on code.kx.com.
-
K.
wj
()¶ window join
For details, see
q.wj
and wj on code.kx.com.
-
K.
wj1
()¶ window join
For details, see
q.wj1
and wj1 on code.kx.com.
-
K.
wsum
()¶ weighted sum
For details, see
q.wsum
and wsum on code.kx.com.
-
K.
ww
()¶ The ww function.
For details, see
q.ww
and ww on code.kx.com.
-
K.
xasc
()¶ table sorted ascending by columns
For details, see
q.xasc
and xasc on code.kx.com.
-
K.
xbar
()¶ interval bar
For details, see
q.xbar
and xbar on code.kx.com.
-
K.
xcol
()¶ rename table columns
For details, see
q.xcol
and xcol on code.kx.com.
-
K.
xcols
()¶ re-order table columns
For details, see
q.xcols
and xcols on code.kx.com.
-
K.
xdesc
()¶ table sorted descending by columns
For details, see
q.xdesc
and xdesc on code.kx.com.
-
K.
xexp
()¶ raised to a power
For details, see
q.xexp
and xexp on code.kx.com.
-
K.
xgroup
()¶ table grouped by keys
For details, see
q.xgroup
and xgroup on code.kx.com.
-
K.
xkey
()¶ set primary keys of a table
For details, see
q.xkey
and xkey on code.kx.com.
-
K.
xlog
()¶ base-x logarithm
For details, see
q.xlog
and xlog on code.kx.com.
-
K.
xprev
()¶ previous items
For details, see
q.xprev
and xprev on code.kx.com.
-
K.
xrank
()¶ items assigned to buckets
For details, see
q.xrank
and 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