Skip to content

Pandas Like API for PyKX Tables

The aim of this page is to demonstrate PyKX functionality that aligns with the approach and principles of the Pandas API for DataFrame interactions. Not all operations supported by Pandas are covered, only the operations on PyKX tables that follow Pandas API conventions. In particular, it focuses on areas where PyKX/q has the potential to provide a performance advantage over the use of Pandas. This advantage may be in the memory footprint of the operations and/or in the execution time of the analytic.

A full breakdown of the the available functionality and examples of its use can be found here.

Covered sections of the Pandas API

Coverage in this instance refers here to functionality covered by the PyKX API for Tables which has equivalent functionality to the methods and attributes supported by the Pandas DataFrame API. This does not cover the functionality supported by Pandas for interactions with Series objects or for reading/writing CSV/JSON files etc.

If there's any functionality you would like to see added to this library, please open an issue here or open a pull request here.

Property/metadata type information

DataFrame Properties PyKX Supported? PyKX API Documentation Link Additional Information
columns link
dtypes link
empty link
ndim link
shape link
size link

Analytic functionality

DataFrame Method PyKX Supported? PyKX API Documentation Link Additional Information
abs link
agg link
apply link
groupby link
max link
mean link
median link
min link
mode link
sum link
skew link
std link
prod link

Querying and data interrogation

DataFrame Method PyKX Supported? PyKX API Documentation Link Additional Information
all link
any link
at link
count link
get link
head link
iloc link
loc link
sample link
select_dtypes link
tail link

Data Preprocessing

DataFrame Method PyKX Supported? PyKX API Documentation Link Additional Information
add_prefix link
add_suffix link
astype link
drop link
drop_duplicates link
pop link
rename link
set_index link

Data Joins/Merge

DataFrame Method PyKX Supported? PyKX API Documentation Link Additional Information
merge link
merge_asof link

Unsupported Functionality

DataFrame Methods PyKX Supported? PyKX API Documentation Link Additional Information
*from* Functionality for the creation of PyKX Tables from alternative data sources is not supported at this time.
*plot* Functionality for the plotting of columns/tables is not supported at this time.
*sparse* Sparse data like interactions presently not supported.
to_* Functionality for the conversion/persistence of PyKX Tables to other formats is not supported at this time.