Skip to main content

An interactive console application for data manipulation

Project description

Sweet: Interactive Data Engineering CLI

Fun, interactive data manipulation in your terminal

Python Versions PyPI PyPI Downloads License

CI Build Repo Status Contributor Covenant

Sweet is a speedy and fun terminal-based data manipulation tool that transforms how you work with tabular data. With its intuitive interface and real-time feedback, you can quickly explore, sort, and make changes to your data. Plus you can do more advanced things like transforming data using interactive Polars expressions.

Sweet is for data scientists, engineers, and developers who want to explore and edit tabular data interactively. And they can do it right in their terminal or IDE, without leaving their coding workflow.

See Sweet in Action

Loading Data and Making Changes

Sweet: Loading data and editing values

Modifying Rows and Columns

Sweet: Modifying rows and columns

Working with Column Types and Saving

Sweet: Changing column types and saving data

Polars Data Manipulation

Sweet: Loading data and modifying with Polars

Copy-Paste from Web Sources

Sweet: Copy-paste data from Wikipedia

Getting Started in 30 Seconds

# Install and launch Sweet
pip install sweet-data
sweet

Once Sweet opens:

  1. Load sample data: use the file browser to load your CSV files or paste data directly from spreadsheets
  2. Try making edits: click on cells to edit values, add/remove columns, or change data types
  3. Use the AI assistant: ask questions like "What does this data show?" or "Filter rows where age > 30" and watch Sweet generate the code
  4. See instant results: Sweet shows you exactly what will change with an approval workflow before applying transformations

The AI assistant is Sweet's premier feature: it can help you explore your data, explain patterns, and generate Polars transformations using natural language. Just type what you want to do and let Sweet handle the code!

Why Choose Sweet?

  • Interactive terminal interface: modern TUI with syntax highlighting and real-time feedback
  • Intuitive navigation: use keyboard shortcuts or mouse/pointer interactions for smooth control
  • Experimental workflow: interactive environment perfect for data exploration and hypothesis testing
  • Flexible data loading: files, stdin piping, or paste data directly from spreadsheets/web tables
  • Multiple export formats: save your transformed data as CSV, TSV, Parquet, JSON, or JSONL
  • Fast operations: built on Polars for high-performance data processing
  • Accessible: perfect for both small datasets and quick exploration tasks

Installation

You can install Sweet using pip:

pip install sweet-data

Sweet AI Assistant

Sweet includes an intelligent AI assistant that transforms how you work with data. This powerful feature uses advanced language models to help you explore, understand, and transform your datasets through natural language interactions.

AI Assistant in Action

Sweet: AI-powered data discussion and transformation

AI-Powered Data Exploration

  • Conversational Analysis: ask questions like "What columns do we have?", "Describe this dataset", or "What are the data types?" and get instant, intelligent responses
  • Smart Data Insights: get contextual analysis and explanations about your data's structure, patterns, and characteristics
  • Interactive Guidance: receive helpful suggestions and explanations as you work through your data analysis workflow

Intelligent Code Generation

  • Natural Language to Code: request transformations like "Add a bonus column that's 30% of salary" or "Filter rows where age is greater than 25" and get working Polars code
  • Comprehensive Polars Support: the AI assistant has deep knowledge of the entire Polars API, including advanced operations like rolling windows, string processing, and datetime manipulations
  • Context-Aware Suggestions: code generation takes into account your actual column names, data types, and dataset structure

Key AI Features

  • Dual Mode Operation: automatically switches between conversational analysis and code generation based on your needs
  • Real-time Context: the AI assistant understands your current dataset structure and provides relevant, specific advice
  • Multiple LLM Support: works with popular language model providers including Anthropic Claude and OpenAI GPT
  • Conversational Context: maintains conversation context to provide better assistance throughout your data exploration session

To use the AI assistant, simply type your questions or requests in natural language, and Sweet will provide intelligent responses, explanations, or generate the appropriate Polars code for your transformations.

The AI assistant is powered by chatlas, a powerful Python package that provides seamless integration with multiple language model providers.

Features That Set Sweet Apart

  • Complete exploration sworkflow: From data loading to transformation to results visualization in a single interface
  • Built for experimentation: Interactive environment perfect for data exploration and hypothesis testing
  • Practical outputs: Get exactly what you need: transformed data, clear results, and transformation tracking
  • Flexible deployment: Use for quick exploration or as a foundation for building data workflows
  • Modern interface: Terminal-based UI with syntax highlighting, keyboard shortcuts, and mouse support for intuitive navigation
  • No vendor lock-in: Uses standard Polars expressions that work in any Python environment

Technical Details & Acknowledgments

Sweet is built on modern Python libraries for optimal performance and developer experience. We're grateful to the maintainers and contributors of these foundational projects:

  • Polars: The blazingly fast DataFrame library that powers all data operations in Sweet
  • Textual: The incredible TUI framework that makes Sweet's interactive interface possible
  • chatlas: The elegant library that enables Sweet's AI assistant capabilities with LLM provider integration
  • Rich: Terminal formatting and beautiful display components
  • Click: Command-line interface for clean CLI integration

The application architecture separates data models from UI components, making it extensible and maintainable. A huge thank you to all the developers who created these powerful, well-designed tools that make Sweet possible!

Contributing to Sweet

There are many ways to contribute to the ongoing development of Sweet. Some contributions can be simple (like fixing typos, improving documentation, filing issues for feature requests or problems, etc.) and others might take more time and care (like answering questions and submitting PRs with code changes). Just know that anything you can do to help would be very much appreciated!

Roadmap

We're actively working on enhancing Sweet with:

  1. Transformation history tracking: Export transformation history as clean Python/Polars scripts for reproducible workflows
  2. Additional data format support (Excel, JSON, Arrow, etc.)
  3. Advanced transformation templates and snippets
  4. Integration with cloud data sources
  5. Export to multiple formats and destinations
  6. Enhanced branching and workflow management
  7. Enhanced AI capabilities: Expanding the AI assistant with more sophisticated analysis and visualization suggestions

If you have any ideas for features or improvements, don't hesitate to share them with us! We are always looking for ways to make Sweet better.

Code of Conduct

Please note that the sweet-data project is released with a contributor code of conduct.
By participating in this project you agree to abide by its terms.

📄 License

sweet-data is licensed under the MIT license.

© sweet-data authors

🏛️ Governance

This project is primarily maintained by Rich Iannone. Other authors may occasionally assist with some of these duties.

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

sweet_data-0.2.0.tar.gz (18.2 MB view details)

Uploaded Source

Built Distribution

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

sweet_data-0.2.0-py3-none-any.whl (95.8 kB view details)

Uploaded Python 3

File details

Details for the file sweet_data-0.2.0.tar.gz.

File metadata

  • Download URL: sweet_data-0.2.0.tar.gz
  • Upload date:
  • Size: 18.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sweet_data-0.2.0.tar.gz
Algorithm Hash digest
SHA256 673c568c52a8e2a1888570a546667a4f27f7fca3bc674a0441a8ee3e8c01c560
MD5 22024d54dbd1960df16251290565203c
BLAKE2b-256 b5e0d16bf369d5e40ec4a2049fb43856c16d76f350ccc0096c01422301aa914d

See more details on using hashes here.

File details

Details for the file sweet_data-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sweet_data-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 95.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sweet_data-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ebd67203f6c0312b8056c22eb620fe188506a549dbcf5a5994c9ad4799fd066
MD5 17438f500c7556ecb82de8d2f7293c82
BLAKE2b-256 c827fb633e7c71cd02d3bf71bddcd78f4b7e78d957000e626065747b034b7d9e

See more details on using hashes here.

Supported by

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