Skip to main content
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?")

Finally if you want to get the code that was generated, you can use ds.code():

ds.code("Who lives in Chicago?")

which will return monokai styled code. If you want to return plain code, you can use:

ds.code("Who lives in Chicago?", return_as_string=True)

Inspirations

Metadata

Release files for date-a-scientist 0.1.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for date-a-scientist 0.1.18
File Size Uploaded Provenance Actions
date_a_scientist-0.1.18.tar.gz 6.5 kB Without provenance Details for date_a_scientist-0.1.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for date-a-scientist 0.1.18
File Interpreter ABI Platform Actions
date_a_scientist-0.1.18-py3-none-any.whl Python 3 none any Details for date_a_scientist-0.1.18-py3-none-any.whl

Total release size: 13.6 kB

Release files / date_a_scientist-0.1.18.tar.gz

Download URL date_a_scientist-0.1.18.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a6396586451a84d82579c5c9713eeb923dfc0db8f0d477c6693966fb33a51148
BLAKE2b-256 checksum
How to use checksums
3f8b715ea5055a4375a5b31c8f6c5f7e3f9041c1efb26d7ed6f7e918967c7d9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.3 Darwin/24.0.0

Release files / date_a_scientist-0.1.18-py3-none-any.whl

Download URL date_a_scientist-0.1.18-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f9abd24177b4ba5478f763241393071bfb883d3dcb6e685d84e500b47467f49
BLAKE2b-256 checksum
How to use checksums
5a7bf1cbf0d1c9ba1c736288de6398c4933470984920359bdbd7db27de5303de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.3 Darwin/24.0.0

Security for date-a-scientist 0.1.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page