Skip to main content

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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: date_a_scientist-0.1.8.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.8.tar.gz
Algorithm Hash digest
SHA256 048b0b7f370c517685d40429605866c414ce195a3e149b6fff520e2e35159a17
MD5 3ba048fb99d2c2fef9c686f3eaf377f5
BLAKE2b-256 8b1cbea96344736c341ccb9b34bbcd8f525e49b443339de31c26ec9077234c97

See more details on using hashes here.

File details

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

File metadata

  • Download URL: date_a_scientist-0.1.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c15062936eec48975c9f8071dd9d568d40842a88728aae4f46ff13cc9f9e0660
MD5 78288a6c83d147227ab76e895ed3cb07
BLAKE2b-256 fbf8998bee609b4f4015fa04d5aacd0e3dd454d7fc2335505a56318d6b8a0574

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

This release

0.1.8 This release

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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