PYKX
Introducing PyKX
KX’s official Python interface. With PyKX, you can:
- Develop with Python and kdb+ in the same workflow
- Use Python to build time-series databases and streaming applications
- Run queries, build APIs, and analyze data using in Python, SQL and kdb+
- Seamlessly work between PyKX and other Python libraries such as Pandas, Numpy, PyArrow
- Visualize data insights natively with tools such as Plotly, Matplotlib and Seaborn
And it’s open source!
# Create an in-memory table
table = kx.Table(data = {
'sym': kx.random.random(1000, ['AAPL', 'GOOG']),
'price': kx.random.random(1000, 10.0),
'volume': kx.random.random(1000, 1000)})
# Query this data
table.select(
columns = kx.Column('price').max().name('max_price') &
kx.Column('price').min().name('min_price') &
kx.Column('price').wavg(kx.Column('volume')).name('vwap'),
by = kx.Column('sym'))
# Add a date column
table.update(kx.Column('date', value = kx.DateAtom('today')), inplace=True)
# Reorder columns setting date as the first column
table.reorder_columns('date', inplace=True)
New to PyKX
We offer a wide range of training options, from self led to KX courses
Integrate with KX products and our partners
We offer a wide range of training options, from self led to KX courses
Didn’t find what you’re looking for?
Ask our Community for help! Whether it’s surfacing existing content or creating new content for your needs, we’re on it!