Python for kdb+
Table of Contents
What’s New in PyQ 4.0
Summary – Release highlights
Enhanced
q)
prompt
New operators
Shift operators
The
@
operator
Typed constructors and casts
Interoperability with NumPy
Matrices and arrays of higher dimensions
Times, dates and timedeltas
Additional conversions
Complex numbers
Path objects
Named tuples
Redesigned adverbs
Installation
Prerequisites
OS Support
Required Software
Installing from the package repository
Installing from source code
Installing PyQ into a virtual environment
Keeping PyQ up-to-date
Installing 32-bit PyQ with the free 32-bit kdb+ and Python 3.6 on 64-bit CentOS 7
1. Install development tools and libraries required to build 32-bit Python
2. Download, compile and install the 32-bit version of Python 3.6.0
3. Install virtualenv into Python installation
4. Create 32-bit Python virtual environment
5. Download the 32-bit Linux x86 version of kdb+ from kx.com
6. Extract kdb+ and install PyQ
6. Use PyQ
Installing PyQ on Ubuntu 16.04
Python 2
Python 3
User Guide
Introduction
The q namespace
The til function
Atomic functions
Mathematical functions
The null function
Aggregation functions
Accumulation functions
Sliding window statistics
Uniform functions
Set operations
Sorting and searching
From Python to kdb+
From kdb+ to Python
Working with files
K objects
Constructors and casts
Operators
The if statement and boolean operators
Arithmetic operations
The flip (
+
) operator
Bitwise operators
The
@
operator
Adverbs
Each
Over and scan
Each previous
Adverbs vs and sv
Input/Output
Numeric Computing
Primitive data types
Simple types
Dates, times and durations
Characters, strings and symbols
Nested lists
Tables and dictionaries
Enhanced shell
q) prompt
Calling Python from KDB+
The “p” language
Exporting Python functions to q
Reference Manual
class K
namespace q
Q functions
Version History
PyQ 4.0.2
PyQ 4.0.1
PyQ 4.0
PyQ 3.8.4
PyQ 3.8.3
PyQ 3.8.2
PyQ 3.8.1
PyQ 3.8
PyQ 3.7.2
PyQ 3.7.1
PyQ 3.7
PyQ 3.6.2
PyQ 3.6.1
PyQ 3.6.0
PyQ 3.5.2
PyQ 3.5.1
PyQ 3.5.0
PyQ 3.4.5
PyQ 3.4.4
PyQ 3.4.3
PyQ 3.4.2
PyQ 3.4.1
PyQ 3.4
PyQ 3.3
PyQ 3.2
PyQ 3.2.0 beta
PyQ 3.1.0
2012-08-10
PyQ 3.0.1
2009-10-23
2009-01-02
2007-03-30
0.3
0.2
License
Copyright
Free 32-bit license
64-bit license
Python for kdb+
Docs
»
Index
Index
_
|
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
K
|
L
|
M
|
N
|
O
|
P
|
Q
|
R
|
S
|
T
|
U
|
V
|
W
|
X
_
__call__ (pyq.K attribute)
__call__() (pyq.q method)
__contains__() (pyq.K method)
__eq__() (pyq.K method)
__float__() (pyq.K method)
__get__ (pyq.K attribute)
__getattr__() (pyq.K method)
__getitem__() (pyq.K method)
__int__() (pyq.K method)
A
abs() (K method)
(pyq.K method)
acos() (K method)
(pyq.K method)
aj() (K method)
(pyq.K method)
aj0() (K method)
(pyq.K method)
all() (K method)
(pyq.K method)
and_() (K method)
(pyq.K method)
any() (K method)
(pyq.K method)
asc() (K method)
(pyq.K method)
asin() (K method)
(pyq.K method)
asof() (K method)
(pyq.K method)
atan() (K method)
(pyq.K method)
attr() (K method)
(pyq.K method)
avg() (K method)
(pyq.K method)
avgs() (K method)
(pyq.K method)
B
bin() (K method)
(pyq.K method)
binr() (K method)
(pyq.K method)
C
ceiling() (K method)
(pyq.K method)
cols() (K method)
(pyq.K method)
cor() (K method)
(pyq.K method)
cos() (K method)
(pyq.K method)
count() (K method)
(pyq.K method)
cov() (K method)
(pyq.K method)
cross() (K method)
(pyq.K method)
csv() (K method)
(pyq.K method)
cut() (K method)
(pyq.K method)
D
deltas() (K method)
(pyq.K method)
desc() (K method)
(pyq.K method)
dev() (K method)
(pyq.K method)
differ() (K method)
(pyq.K method)
distinct() (K method)
(pyq.K method)
div() (K method)
(pyq.K method)
dsave() (K method)
(pyq.K method)
E
ej() (K method)
(pyq.K method)
ema() (K method)
,
[1]
(pyq.K method)
,
[1]
enlist() (K method)
(pyq.K method)
eval() (K method)
(pyq.K method)
except_() (K method)
(pyq.K method)
exec() (pyq.K method)
exp() (K method)
(pyq.K method)
F
fby() (K method)
(pyq.K method)
fills() (K method)
(pyq.K method)
first() (K method)
(pyq.K method)
fkeys() (K method)
(pyq.K method)
flip() (K method)
(pyq.K method)
floor() (K method)
(pyq.K method)
G
get() (K method)
(pyq.K method)
getenv() (K method)
(pyq.K method)
group() (K method)
(pyq.K method)
gtime() (K method)
(pyq.K method)
H
hclose() (K method)
(pyq.K method)
hcount() (K method)
(pyq.K method)
hdel() (K method)
(pyq.K method)
hopen() (K method)
(pyq.K method)
hsym() (K method)
(pyq.K method)
I
iasc() (K method)
(pyq.K method)
idesc() (K method)
(pyq.K method)
ij() (K method)
(pyq.K method)
ijf() (K method)
(pyq.K method)
in_() (K method)
(pyq.K method)
insert() (K method)
(pyq.K method)
inter() (K method)
(pyq.K method)
inv() (K method)
(pyq.K method)
K
K (class in pyq)
kerr (in module pyq)
key() (K method)
(pyq.K method)
keys() (K method)
(pyq.K method)
,
[1]
L
last() (K method)
(pyq.K method)
like() (K method)
(pyq.K method)
lj() (K method)
(pyq.K method)
ljf() (K method)
(pyq.K method)
load() (K method)
(pyq.K method)
log() (K method)
(pyq.K method)
lower() (K method)
(pyq.K method)
lsq() (K method)
(pyq.K method)
ltime() (K method)
(pyq.K method)
ltrim() (K method)
(pyq.K method)
M
mavg() (K method)
(pyq.K method)
max() (K method)
(pyq.K method)
maxs() (K method)
(pyq.K method)
mcount() (K method)
(pyq.K method)
md5() (K method)
(pyq.K method)
mdev() (K method)
(pyq.K method)
med() (K method)
(pyq.K method)
meta() (K method)
(pyq.K method)
min() (K method)
(pyq.K method)
mins() (K method)
(pyq.K method)
mmax() (K method)
(pyq.K method)
mmin() (K method)
(pyq.K method)
mmu() (K method)
(pyq.K method)
mod() (K method)
(pyq.K method)
msum() (K method)
(pyq.K method)
N
neg() (K method)
(pyq.K method)
next() (K method)
(pyq.K method)
not_() (K method)
(pyq.K method)
null() (K method)
(pyq.K method)
O
or_() (K method)
(pyq.K method)
P
parse() (K method)
(pyq.K method)
peach() (K method)
(pyq.K method)
pj() (K method)
(pyq.K method)
prd() (K method)
(pyq.K method)
prds() (K method)
(pyq.K method)
prev() (K method)
(pyq.K method)
prior() (K method)
(pyq.K method)
Q
q (in module pyq)
q.abs() (built-in function)
(in module pyq)
q.acos() (built-in function)
(in module pyq)
q.aj() (built-in function)
(in module pyq)
q.aj0() (built-in function)
(in module pyq)
q.all() (built-in function)
(in module pyq)
q.and_() (built-in function)
(in module pyq)
q.any() (built-in function)
(in module pyq)
q.asc() (built-in function)
(in module pyq)
q.asin() (built-in function)
(in module pyq)
q.asof() (built-in function)
(in module pyq)
q.atan() (built-in function)
(in module pyq)
q.attr() (built-in function)
(in module pyq)
q.avg() (built-in function)
(in module pyq)
q.avgs() (built-in function)
(in module pyq)
q.bin() (built-in function)
(in module pyq)
q.binr() (built-in function)
(in module pyq)
q.ceiling() (built-in function)
(in module pyq)
q.cols() (built-in function)
(in module pyq)
q.cor() (built-in function)
(in module pyq)
q.cos() (built-in function)
(in module pyq)
q.count() (built-in function)
(in module pyq)
q.cov() (built-in function)
(in module pyq)
q.cross() (built-in function)
(in module pyq)
q.csv() (built-in function)
(in module pyq)
q.cut() (built-in function)
(in module pyq)
q.deltas() (built-in function)
(in module pyq)
q.desc() (built-in function)
(in module pyq)
q.dev() (built-in function)
(in module pyq)
q.differ() (built-in function)
(in module pyq)
q.distinct() (built-in function)
(in module pyq)
q.div() (built-in function)
(in module pyq)
q.dsave() (built-in function)
(in module pyq)
q.ej() (built-in function)
(in module pyq)
q.ema() (built-in function)
,
[1]
(in module pyq)
,
[1]
q.enlist() (built-in function)
(in module pyq)
q.eval() (built-in function)
(in module pyq)
q.except_() (built-in function)
(in module pyq)
q.exp() (built-in function)
(in module pyq)
q.fby() (built-in function)
(in module pyq)
q.fills() (built-in function)
(in module pyq)
q.first() (built-in function)
(in module pyq)
q.fkeys() (built-in function)
(in module pyq)
q.flip() (built-in function)
(in module pyq)
q.floor() (built-in function)
(in module pyq)
q.get() (built-in function)
(in module pyq)
q.getenv() (built-in function)
(in module pyq)
q.group() (built-in function)
(in module pyq)
q.gtime() (built-in function)
(in module pyq)
q.hclose() (built-in function)
(in module pyq)
q.hcount() (built-in function)
(in module pyq)
q.hdel() (built-in function)
(in module pyq)
q.hopen() (built-in function)
(in module pyq)
q.hsym() (built-in function)
(in module pyq)
q.iasc() (built-in function)
(in module pyq)
q.idesc() (built-in function)
(in module pyq)
q.ij() (built-in function)
(in module pyq)
q.ijf() (built-in function)
(in module pyq)
q.in_() (built-in function)
(in module pyq)
q.insert() (built-in function)
(in module pyq)
q.inter() (built-in function)
(in module pyq)
q.inv() (built-in function)
(in module pyq)
q.key() (built-in function)
(in module pyq)
q.keys() (built-in function)
(in module pyq)
q.last() (built-in function)
(in module pyq)
q.like() (built-in function)
(in module pyq)
q.lj() (built-in function)
(in module pyq)
q.ljf() (built-in function)
(in module pyq)
q.load() (built-in function)
(in module pyq)
q.log() (built-in function)
(in module pyq)
q.lower() (built-in function)
(in module pyq)
q.lsq() (built-in function)
(in module pyq)
q.ltime() (built-in function)
(in module pyq)
q.ltrim() (built-in function)
(in module pyq)
q.mavg() (built-in function)
(in module pyq)
q.max() (built-in function)
(in module pyq)
q.maxs() (built-in function)
(in module pyq)
q.mcount() (built-in function)
(in module pyq)
q.md5() (built-in function)
(in module pyq)
q.mdev() (built-in function)
(in module pyq)
q.med() (built-in function)
(in module pyq)
q.meta() (built-in function)
(in module pyq)
q.min() (built-in function)
(in module pyq)
q.mins() (built-in function)
(in module pyq)
q.mmax() (built-in function)
(in module pyq)
q.mmin() (built-in function)
(in module pyq)
q.mmu() (built-in function)
(in module pyq)
q.mod() (built-in function)
(in module pyq)
q.msum() (built-in function)
(in module pyq)
q.neg() (built-in function)
(in module pyq)
q.next() (built-in function)
(in module pyq)
q.not_() (built-in function)
(in module pyq)
q.null() (built-in function)
(in module pyq)
q.or_() (built-in function)
(in module pyq)
q.parse() (built-in function)
(in module pyq)
q.peach() (built-in function)
(in module pyq)
q.pj() (built-in function)
(in module pyq)
q.prd() (built-in function)
(in module pyq)
q.prds() (built-in function)
(in module pyq)
q.prev() (built-in function)
(in module pyq)
q.prior() (built-in function)
(in module pyq)
q.rand() (built-in function)
(in module pyq)
q.rank() (built-in function)
(in module pyq)
q.ratios() (built-in function)
(in module pyq)
q.raze() (built-in function)
(in module pyq)
q.read0() (built-in function)
(in module pyq)
q.read1() (built-in function)
(in module pyq)
q.reciprocal() (built-in function)
(in module pyq)
q.reval() (built-in function)
(in module pyq)
q.reverse() (built-in function)
(in module pyq)
q.rload() (built-in function)
(in module pyq)
q.rotate() (built-in function)
(in module pyq)
q.rsave() (built-in function)
(in module pyq)
q.rtrim() (built-in function)
(in module pyq)
q.save() (built-in function)
(in module pyq)
q.scov() (built-in function)
,
[1]
(in module pyq)
,
[1]
q.sdev() (built-in function)
,
[1]
(in module pyq)
,
[1]
q.set() (built-in function)
(in module pyq)
q.setenv() (built-in function)
(in module pyq)
q.show() (built-in function)
(in module pyq)
q.signum() (built-in function)
(in module pyq)
q.sin() (built-in function)
(in module pyq)
q.sqrt() (built-in function)
(in module pyq)
q.ss() (built-in function)
(in module pyq)
q.ssr() (built-in function)
(in module pyq)
q.string() (built-in function)
(in module pyq)
q.sublist() (built-in function)
(in module pyq)
q.sum() (built-in function)
(in module pyq)
q.sums() (built-in function)
(in module pyq)
q.sv() (built-in function)
(in module pyq)
q.svar() (built-in function)
,
[1]
(in module pyq)
,
[1]
q.system() (built-in function)
(in module pyq)
q.tables() (built-in function)
(in module pyq)
q.tan() (built-in function)
(in module pyq)
q.til() (built-in function)
(in module pyq)
q.trim() (built-in function)
(in module pyq)
q.type() (built-in function)
(in module pyq)
q.uj() (built-in function)
(in module pyq)
q.ujf() (built-in function)
(in module pyq)
q.ungroup() (built-in function)
(in module pyq)
q.union() (built-in function)
(in module pyq)
q.upper() (built-in function)
(in module pyq)
q.upsert() (built-in function)
(in module pyq)
q.value() (built-in function)
(in module pyq)
q.var() (built-in function)
(in module pyq)
q.view() (built-in function)
(in module pyq)
q.views() (built-in function)
(in module pyq)
q.vs() (built-in function)
(in module pyq)
q.wavg() (built-in function)
(in module pyq)
q.where() (built-in function)
(in module pyq)
q.within() (built-in function)
(in module pyq)
q.wj() (built-in function)
(in module pyq)
q.wj1() (built-in function)
(in module pyq)
q.wsum() (built-in function)
(in module pyq)
q.ww() (built-in function)
(in module pyq)
q.xasc() (built-in function)
(in module pyq)
q.xbar() (built-in function)
(in module pyq)
q.xcol() (built-in function)
(in module pyq)
q.xcols() (built-in function)
(in module pyq)
q.xdesc() (built-in function)
(in module pyq)
q.xexp() (built-in function)
(in module pyq)
q.xgroup() (built-in function)
(in module pyq)
q.xkey() (built-in function)
(in module pyq)
q.xlog() (built-in function)
(in module pyq)
q.xprev() (built-in function)
(in module pyq)
q.xrank() (built-in function)
(in module pyq)
R
rand() (K method)
(pyq.K method)
rank() (K method)
(pyq.K method)
ratios() (K method)
(pyq.K method)
raze() (K method)
(pyq.K method)
read0() (K method)
(pyq.K method)
read1() (K method)
(pyq.K method)
reciprocal() (K method)
(pyq.K method)
reval() (K method)
(pyq.K method)
reverse() (K method)
(pyq.K method)
rload() (K method)
(pyq.K method)
rotate() (K method)
(pyq.K method)
rsave() (K method)
(pyq.K method)
rtrim() (K method)
(pyq.K method)
S
save() (K method)
(pyq.K method)
scov() (K method)
,
[1]
(pyq.K method)
,
[1]
sdev() (K method)
,
[1]
(pyq.K method)
,
[1]
select() (pyq.K method)
set() (K method)
(pyq.K method)
setenv() (K method)
(pyq.K method)
show() (K method)
(pyq.K method)
,
[1]
signum() (K method)
(pyq.K method)
sin() (K method)
(pyq.K method)
sqrt() (K method)
(pyq.K method)
ss() (K method)
(pyq.K method)
ssr() (K method)
(pyq.K method)
string() (K method)
(pyq.K method)
sublist() (K method)
(pyq.K method)
sum() (K method)
(pyq.K method)
sums() (K method)
(pyq.K method)
sv() (K method)
(pyq.K method)
svar() (K method)
,
[1]
(pyq.K method)
,
[1]
system() (K method)
(pyq.K method)
T
tables() (K method)
(pyq.K method)
tan() (K method)
(pyq.K method)
til() (K method)
(pyq.K method)
trim() (K method)
(pyq.K method)
type() (K method)
(pyq.K method)
U
uj() (K method)
(pyq.K method)
ujf() (K method)
(pyq.K method)
ungroup() (K method)
(pyq.K method)
union() (K method)
(pyq.K method)
update() (pyq.K method)
upper() (K method)
(pyq.K method)
upsert() (K method)
(pyq.K method)
V
value() (K method)
(pyq.K method)
var() (K method)
(pyq.K method)
view() (K method)
(pyq.K method)
views() (K method)
(pyq.K method)
vs() (K method)
(pyq.K method)
W
wavg() (K method)
(pyq.K method)
where() (K method)
(pyq.K method)
within() (K method)
(pyq.K method)
wj() (K method)
(pyq.K method)
wj1() (K method)
(pyq.K method)
wsum() (K method)
(pyq.K method)
ww() (K method)
(pyq.K method)
X
xasc() (K method)
(pyq.K method)
xbar() (K method)
(pyq.K method)
xcol() (K method)
(pyq.K method)
xcols() (K method)
(pyq.K method)
xdesc() (K method)
(pyq.K method)
xexp() (K method)
(pyq.K method)
xgroup() (K method)
(pyq.K method)
xkey() (K method)
(pyq.K method)
xlog() (K method)
(pyq.K method)
xprev() (K method)
(pyq.K method)
xrank() (K method)
(pyq.K method)