datasets module

class pycax.datasets.DatasetsResponse(url, args)[source]

An CAX Datasets Response Object

Usage

from pycax import datasets

query = datasets.get()  # Build the Query
query.execute()  # Execute the Query
query.data  # Returns the data

# or return a data frame directly
df = datasets.getdf()
df.head()

Methods:

pycax.datasets.get(args={}, **kwargs)[source]

Get the table of data sets

Parameters:

args – [dict] a dictionary of query parameters. The default is no parameters which returns the full table.

Returns:

A Tables Response of the JSON

Usage:

from pycax import tables
query = tables.get()
res = query.execute()
query.to_pandas()
pycax.datasets.getdf(args={'XApiKey': '7A2F1EA9-4882-49E8-B23D-7DC202C2ACA5'}, **kwargs)[source]

Make query for the data sets and return a pandas DataFrame

Parameters:

args – [dict] a dictionary of query parameters. The default is no parameters which returns the full table.

Returns:

A pandas DataFrame

Usage:

from pycax import tables
datasets.getdf()