Skip to main content

Query dataframes, find issue with your notebook snippets as if a professional data scientist was pair coding with you

Project description

date-a-scientist Logo

date-a-scientist

Query dataframes, find issue with your notebook snippets as if a professional data scientist was pair coding with you.

Currently just a thin wrapper around an amazing library called pandas-ai by sinaptik-ai!

How to use it?

from date_a_scientist import DateAScientist
import pandas as pd

df = pd.DataFrame(
    [
        {"name": "Alice", "age": 25, "city": "New York"},
        {"name": "Bob", "age": 30, "city": "Los Angeles"},
        {"name": "Charlie", "age": 35, "city": "Chicago"},
    ]
)
ds = DateAScientist(
    df=df,
    llm_openai_api_token=...,  # your OpenAI API token goes here
    llm_model_name="gpt-3.5-turbo",  # by default, it uses "gpt-4o"
)

# should return "Alice"
ds.chat("What is the name of the first person?")

Additionally we can pass a description of fields, so that more meaningful questions can be asked:

ds = DateAScientist(
    df=df,
    llm_openai_api_token=...,  # your OpenAI API token goes here
    llm_model_name="gpt-3.5-turbo",  # by default, it uses "gpt-4o"
    column_descriptions={
        "name": "The name of the person",
        "age": "The age of the person",
        "city": "The city where the person lives",
    },
)

ds = DateAScientist(
    df=df,
    llm_openai_api_token=...,  # your OpenAI API token goes here
    llm_model_name="gpt-3.5-turbo",  # by default, it uses "gpt-4o"
)

# should return DataFrame with Chicago rows
ds.chat("Who lives in Chicago?")

Inspirations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

date_a_scientist-0.1.13.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

date_a_scientist-0.1.13-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file date_a_scientist-0.1.13.tar.gz.

File metadata

  • Download URL: date_a_scientist-0.1.13.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.3 Darwin/23.4.0

File hashes

Hashes for date_a_scientist-0.1.13.tar.gz
Algorithm Hash digest
SHA256 85e44ea8c8c7127b653b835f0e48c011a535e924750bd80f3c8370642e0cd976
MD5 26a791044ad5652e9b32f05ae10649d4
BLAKE2b-256 40b6801cbaf7fb6d27fde271a787bd428fb6fde6fa84b58ff10f76856e37b367

See more details on using hashes here.

File details

Details for the file date_a_scientist-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: date_a_scientist-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.3 Darwin/23.4.0

File hashes

Hashes for date_a_scientist-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 912987bafc07f172867c38cf3bd1996ff306dd77ce3aac748ea6e01e072a00a7
MD5 3bf1def4d36be010f8a86f493d91eb78
BLAKE2b-256 44f8eb54a9979c24b0b2e777c5e3e7807c109b201ce794bfeb662fb5a049ea48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page