Edit me

Askdata Python client is a friendly Python library that helps developers, data scientists and engineers build and manage agent using Askdata platform. Creating an Agent will allow you to enhance your experience with data and have fun playing with it.

Getting Started with the Askdata Python SDK

Getting up and running with Askdata python client is easy. Install client from pypi:

Askdata

Askdata Examples

Colab This repository contains examples of Askdata usage in serving different types of data.

Installation

pip install askdata or pip install -r requirements.txt

Authentication

Lets handle our authenticaton

import askdata as ad
from askdata.askdata_client import Askdata, Agent
askdata = Askdata()

You will be prompted to insert your user details. Once you have done that, you good to go.

Query your data

This is an example of a query using the SDK. We select the agent called Sales Demo and we ask: give me sales by countries

# Load the list of the agents connected to your account as a pandas dataframe
get_agents_df = askdata.agents_dataframe()
# Get one agent
agent = Agent(askdata, 'Sales Demo')
# Simple query
df = agent.ask('give me sales by countries')
df

How to create or replace a dataset for a given Agent


# the first three parameters are mandatory, they are needed to understand if the dataset already exists (i.e. needs to be replaced)
# or needs to be created
agent.create_or_replace_dataset(frame=df, dataset_name='Web Sources', slug="timesheet")

Example Notebooks

You can easily understand how to integrate the Askdata SDK using these Python Notebooks step-by-step walkthrough.

https://github.com/AskdataHQ/askdata-docs/tree/gh-pages/notebooks