Power up your data science workflow with ChatGPT
Project description
pandas-gpt
Power up your data science workflow with ChatGPT.
pandas-gpt
is a Python library for doing almost anything with a pandas DataFrame based on natural language queries.
Installation
pip install pandas-gpt
Set the OPENAI_API_KEY
environment variable to your OpenAI API key, or use the following code snippet:
import openai
openai.api_key = 'sk-**********'
Examples
Setup and usage examples are available in this Google Colab notebook.
import pandas as pd
import pandas_gpt
df = pd.DataFrame(...)
# Run Python code generated by ChatGPT
df.ask('plot x and y with nice colors')
# Return a value
model = df.ask('LightGBM model trained on the dataset')
# Specify a column or index
df['my_column'].ask('geometric mean')
# Show additional output
df.ask('clean the dataset', verbose=True)
# Print source code without running
df.ask.code('do something interesting with the dataset')
Alternatives
- GitHub Copilot: General-purpose code completion (paid subscription)
- Sketch: AI-powered data summarization and code suggestions (works without an API key)
Disclaimer
Please note that the limitations of ChatGPT also apply to this library. I would recommend using pandas-gpt
in a sandboxed environment such as Google Colab, Kaggle, or GitPod.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pandas-gpt-0.4.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for pandas_gpt-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba7293e91b271404aa2e45c12d931098794ea5cb0fe03e7ec57abb5bfaea1c38 |
|
MD5 | 0997e4286126c1dd4bfa7698299105ec |
|
BLAKE2b-256 | 362071704186d64bc4b3c1d7488be398912c56705cbf6916b2bd8fe09f2c1de5 |