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

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.10.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

date_a_scientist-0.1.10-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: date_a_scientist-0.1.10.tar.gz
  • Upload date:
  • Size: 4.3 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.10.tar.gz
Algorithm Hash digest
SHA256 69f537b2fffd7f53b9b699609d71848c0a5ae82fa5ed0cb9b2f83633deae2949
MD5 defb4fc4f9d311e882e24d35c16e7fbf
BLAKE2b-256 5a5ec5070043c83e552d23979efb44f94339b4aa49166d776dee1cb3faa01b6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: date_a_scientist-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e52bdcca2a6fec193a1453523ac85f181ef839a2d186c7cf121075c954b94dec
MD5 8294c6d7f0ec1925d275c1395e239f11
BLAKE2b-256 5c2769e7e3e116f21c02ac1f70ab85f034afdc6e95fb5e92c9b06182b9f730b8

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