ibis-framework


Nameibis-framework JSON
Version 10.0.0 PyPI version JSON
download
home_pageNone
SummaryThe portable Python dataframe library
upload_time2025-02-06 21:07:43
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ibis

[![Documentation status](https://img.shields.io/badge/docs-docs.ibis--project.org-blue.svg)](http://ibis-project.org)
[![Project chat](https://img.shields.io/badge/zulip-join_chat-purple.svg?logo=zulip)](https://ibis-project.zulipchat.com)
[![Anaconda badge](https://anaconda.org/conda-forge/ibis-framework/badges/version.svg)](https://anaconda.org/conda-forge/ibis-framework)
[![PyPI](https://img.shields.io/pypi/v/ibis-framework.svg)](https://pypi.org/project/ibis-framework)
[![Build status](https://github.com/ibis-project/ibis/actions/workflows/ibis-main.yml/badge.svg)](https://github.com/ibis-project/ibis/actions/workflows/ibis-main.yml?query=branch%3Amain)
[![Build status](https://github.com/ibis-project/ibis/actions/workflows/ibis-backends.yml/badge.svg)](https://github.com/ibis-project/ibis/actions/workflows/ibis-backends.yml?query=branch%3Amain)
[![Codecov branch](https://img.shields.io/codecov/c/github/ibis-project/ibis/main.svg)](https://codecov.io/gh/ibis-project/ibis)

## What is Ibis?

Ibis is the portable Python dataframe library:

- Fast local dataframes (via DuckDB by default)
- Lazy dataframe expressions
- Interactive mode for iterative data exploration
- [Compose Python dataframe and SQL code](#python--sql-better-together)
- Use the same dataframe API for [nearly 20 backends](#backends)
- Iterate locally and deploy remotely by [changing a single line of code](#portability)

See the documentation on ["Why Ibis?"](https://ibis-project.org/why) to learn more.

## Getting started

You can `pip install` Ibis with a backend and example data:

```bash
pip install 'ibis-framework[duckdb,examples]'
```

> πŸ’‘ **Tip**
>
> See the [installation guide](https://ibis-project.org/install) for more installation options.

Then use Ibis:

```python
>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.examples.penguins.fetch()
>>> t
┏━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━┓
┃ species ┃ island    ┃ bill_length_mm ┃ bill_depth_mm ┃ flipper_length_mm ┃ body_mass_g ┃ sex    ┃ year  ┃
┑━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━┩
β”‚ string  β”‚ string    β”‚ float64        β”‚ float64       β”‚ int64             β”‚ int64       β”‚ string β”‚ int64 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Adelie  β”‚ Torgersen β”‚           39.1 β”‚          18.7 β”‚               181 β”‚        3750 β”‚ male   β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           39.5 β”‚          17.4 β”‚               186 β”‚        3800 β”‚ female β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           40.3 β”‚          18.0 β”‚               195 β”‚        3250 β”‚ female β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           NULL β”‚          NULL β”‚              NULL β”‚        NULL β”‚ NULL   β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           36.7 β”‚          19.3 β”‚               193 β”‚        3450 β”‚ female β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           39.3 β”‚          20.6 β”‚               190 β”‚        3650 β”‚ male   β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           38.9 β”‚          17.8 β”‚               181 β”‚        3625 β”‚ female β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           39.2 β”‚          19.6 β”‚               195 β”‚        4675 β”‚ male   β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           34.1 β”‚          18.1 β”‚               193 β”‚        3475 β”‚ NULL   β”‚  2007 β”‚
β”‚ Adelie  β”‚ Torgersen β”‚           42.0 β”‚          20.2 β”‚               190 β”‚        4250 β”‚ NULL   β”‚  2007 β”‚
β”‚ …       β”‚ …         β”‚              … β”‚             … β”‚                 … β”‚           … β”‚ …      β”‚     … β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
>>> g = t.group_by("species", "island").agg(count=t.count()).order_by("count")
>>> g
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━┓
┃ species   ┃ island    ┃ count ┃
┑━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━┩
β”‚ string    β”‚ string    β”‚ int64 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Adelie    β”‚ Biscoe    β”‚    44 β”‚
β”‚ Adelie    β”‚ Torgersen β”‚    52 β”‚
β”‚ Adelie    β”‚ Dream     β”‚    56 β”‚
β”‚ Chinstrap β”‚ Dream     β”‚    68 β”‚
β”‚ Gentoo    β”‚ Biscoe    β”‚   124 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
```

> πŸ’‘ **Tip**
>
> See the [getting started tutorial](https://ibis-project.org/tutorials/getting_started) for a full introduction to Ibis.

## Python + SQL: better together

For most backends, Ibis works by compiling its dataframe expressions into SQL:

```python
>>> ibis.to_sql(g)
SELECT
  "t1"."species",
  "t1"."island",
  "t1"."count"
FROM (
  SELECT
    "t0"."species",
    "t0"."island",
    COUNT(*) AS "count"
  FROM "penguins" AS "t0"
  GROUP BY
    1,
    2
) AS "t1"
ORDER BY
  "t1"."count" ASC
```

You can mix SQL and Python code:

```python
>>> a = t.sql("SELECT species, island, count(*) AS count FROM penguins GROUP BY 1, 2")
>>> a
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━┓
┃ species   ┃ island    ┃ count ┃
┑━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━┩
β”‚ string    β”‚ string    β”‚ int64 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Adelie    β”‚ Torgersen β”‚    52 β”‚
β”‚ Adelie    β”‚ Biscoe    β”‚    44 β”‚
β”‚ Adelie    β”‚ Dream     β”‚    56 β”‚
β”‚ Gentoo    β”‚ Biscoe    β”‚   124 β”‚
β”‚ Chinstrap β”‚ Dream     β”‚    68 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
>>> b = a.order_by("count")
>>> b
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━┓
┃ species   ┃ island    ┃ count ┃
┑━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━┩
β”‚ string    β”‚ string    β”‚ int64 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Adelie    β”‚ Biscoe    β”‚    44 β”‚
β”‚ Adelie    β”‚ Torgersen β”‚    52 β”‚
β”‚ Adelie    β”‚ Dream     β”‚    56 β”‚
β”‚ Chinstrap β”‚ Dream     β”‚    68 β”‚
β”‚ Gentoo    β”‚ Biscoe    β”‚   124 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
```

This allows you to combine the flexibility of Python with the scale and performance of modern SQL.

## Backends

Ibis supports nearly 20 backends:

- [Apache DataFusion](https://ibis-project.org/backends/datafusion/)
- [Apache Druid](https://ibis-project.org/backends/druid/)
- [Apache Flink](https://ibis-project.org/backends/flink)
- [Apache Impala](https://ibis-project.org/backends/impala/)
- [Apache PySpark](https://ibis-project.org/backends/pyspark/)
- [BigQuery](https://ibis-project.org/backends/bigquery/)
- [ClickHouse](https://ibis-project.org/backends/clickhouse/)
- [DuckDB](https://ibis-project.org/backends/duckdb/)
- [Exasol](https://ibis-project.org/backends/exasol)
- [MySQL](https://ibis-project.org/backends/mysql/)
- [Oracle](https://ibis-project.org/backends/oracle/)
- [Polars](https://ibis-project.org/backends/polars/)
- [PostgreSQL](https://ibis-project.org/backends/postgresql/)
- [RisingWave](https://ibis-project.org/backends/risingwave/)
- [SQL Server](https://ibis-project.org/backends/mssql/)
- [SQLite](https://ibis-project.org/backends/sqlite/)
- [Snowflake](https://ibis-project.org/backends/snowflake)
- [Trino](https://ibis-project.org/backends/trino/)

## How it works

Most Python dataframes are tightly coupled to their execution engine. And many databases only support SQL, with no Python API. Ibis solves this problem by providing a common API for data manipulation in Python, and compiling that API into the backend’s native language. This means you can learn a single API and use it across any supported backend (execution engine).

Ibis broadly supports two types of backend:

1. SQL-generating backends
2. DataFrame-generating backends

![Ibis backend types](./docs/images/backends.png)

## Portability

To use different backends, you can set the backend Ibis uses:

```python
>>> ibis.set_backend("duckdb")
>>> ibis.set_backend("polars")
>>> ibis.set_backend("datafusion")
```

Typically, you'll create a connection object:

```python
>>> con = ibis.duckdb.connect()
>>> con = ibis.polars.connect()
>>> con = ibis.datafusion.connect()
```

And work with tables in that backend:

```python
>>> con.list_tables()
['penguins']
>>> t = con.table("penguins")
```

You can also read from common file formats like CSV or Apache Parquet:

```python
>>> t = con.read_csv("penguins.csv")
>>> t = con.read_parquet("penguins.parquet")
```

This allows you to iterate locally and deploy remotely by changing a single line of code.

> πŸ’‘ **Tip**
>
> Check out [the blog on backend agnostic arrays](https://ibis-project.org/posts/backend-agnostic-arrays/) for one example using the same code across DuckDB and BigQuery.

## Community and contributing

Ibis is an open source project and welcomes contributions from anyone in the community.

- Read [the contributing guide](https://github.com/ibis-project/ibis/blob/main/docs/CONTRIBUTING.md).
- We care about keeping the community welcoming for all. Check out [the code of conduct](https://github.com/ibis-project/ibis/blob/main/CODE_OF_CONDUCT.md).
- The Ibis project is open sourced under the [Apache License](https://github.com/ibis-project/ibis/blob/main/LICENSE.txt).

Join our community by interacting on GitHub or chatting with us on [Zulip](https://ibis-project.zulipchat.com/).

For more information visit https://ibis-project.org/.

## Governance

The Ibis project is an [independently governed](https://github.com/ibis-project/governance/blob/main/governance.md) open source community project to build and maintain the portable Python dataframe library. Ibis has contributors across a range of data companies and institutions.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ibis-framework",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Ibis Maintainers <maintainers@ibis-project.org>",
    "keywords": null,
    "author": null,
    "author_email": "Ibis Maintainers <maintainers@ibis-project.org>",
    "download_url": "https://files.pythonhosted.org/packages/0a/65/f5bff0ee716930a3f117c8dd72f14e7e40516ea3932b398c54223696de0a/ibis_framework-10.0.0.tar.gz",
    "platform": null,
    "description": "# Ibis\n\n[![Documentation status](https://img.shields.io/badge/docs-docs.ibis--project.org-blue.svg)](http://ibis-project.org)\n[![Project chat](https://img.shields.io/badge/zulip-join_chat-purple.svg?logo=zulip)](https://ibis-project.zulipchat.com)\n[![Anaconda badge](https://anaconda.org/conda-forge/ibis-framework/badges/version.svg)](https://anaconda.org/conda-forge/ibis-framework)\n[![PyPI](https://img.shields.io/pypi/v/ibis-framework.svg)](https://pypi.org/project/ibis-framework)\n[![Build status](https://github.com/ibis-project/ibis/actions/workflows/ibis-main.yml/badge.svg)](https://github.com/ibis-project/ibis/actions/workflows/ibis-main.yml?query=branch%3Amain)\n[![Build status](https://github.com/ibis-project/ibis/actions/workflows/ibis-backends.yml/badge.svg)](https://github.com/ibis-project/ibis/actions/workflows/ibis-backends.yml?query=branch%3Amain)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ibis-project/ibis/main.svg)](https://codecov.io/gh/ibis-project/ibis)\n\n## What is Ibis?\n\nIbis is the portable Python dataframe library:\n\n- Fast local dataframes (via DuckDB by default)\n- Lazy dataframe expressions\n- Interactive mode for iterative data exploration\n- [Compose Python dataframe and SQL code](#python--sql-better-together)\n- Use the same dataframe API for [nearly 20 backends](#backends)\n- Iterate locally and deploy remotely by [changing a single line of code](#portability)\n\nSee the documentation on [\"Why Ibis?\"](https://ibis-project.org/why) to learn more.\n\n## Getting started\n\nYou can `pip install` Ibis with a backend and example data:\n\n```bash\npip install 'ibis-framework[duckdb,examples]'\n```\n\n> \ud83d\udca1 **Tip**\n>\n> See the [installation guide](https://ibis-project.org/install) for more installation options.\n\nThen use Ibis:\n\n```python\n>>> import ibis\n>>> ibis.options.interactive = True\n>>> t = ibis.examples.penguins.fetch()\n>>> t\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 species \u2503 island    \u2503 bill_length_mm \u2503 bill_depth_mm \u2503 flipper_length_mm \u2503 body_mass_g \u2503 sex    \u2503 year  \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 string  \u2502 string    \u2502 float64        \u2502 float64       \u2502 int64             \u2502 int64       \u2502 string \u2502 int64 \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Adelie  \u2502 Torgersen \u2502           39.1 \u2502          18.7 \u2502               181 \u2502        3750 \u2502 male   \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           39.5 \u2502          17.4 \u2502               186 \u2502        3800 \u2502 female \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           40.3 \u2502          18.0 \u2502               195 \u2502        3250 \u2502 female \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           NULL \u2502          NULL \u2502              NULL \u2502        NULL \u2502 NULL   \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           36.7 \u2502          19.3 \u2502               193 \u2502        3450 \u2502 female \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           39.3 \u2502          20.6 \u2502               190 \u2502        3650 \u2502 male   \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           38.9 \u2502          17.8 \u2502               181 \u2502        3625 \u2502 female \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           39.2 \u2502          19.6 \u2502               195 \u2502        4675 \u2502 male   \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           34.1 \u2502          18.1 \u2502               193 \u2502        3475 \u2502 NULL   \u2502  2007 \u2502\n\u2502 Adelie  \u2502 Torgersen \u2502           42.0 \u2502          20.2 \u2502               190 \u2502        4250 \u2502 NULL   \u2502  2007 \u2502\n\u2502 \u2026       \u2502 \u2026         \u2502              \u2026 \u2502             \u2026 \u2502                 \u2026 \u2502           \u2026 \u2502 \u2026      \u2502     \u2026 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n>>> g = t.group_by(\"species\", \"island\").agg(count=t.count()).order_by(\"count\")\n>>> g\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 species   \u2503 island    \u2503 count \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 string    \u2502 string    \u2502 int64 \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Adelie    \u2502 Biscoe    \u2502    44 \u2502\n\u2502 Adelie    \u2502 Torgersen \u2502    52 \u2502\n\u2502 Adelie    \u2502 Dream     \u2502    56 \u2502\n\u2502 Chinstrap \u2502 Dream     \u2502    68 \u2502\n\u2502 Gentoo    \u2502 Biscoe    \u2502   124 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n> \ud83d\udca1 **Tip**\n>\n> See the [getting started tutorial](https://ibis-project.org/tutorials/getting_started) for a full introduction to Ibis.\n\n## Python + SQL: better together\n\nFor most backends, Ibis works by compiling its dataframe expressions into SQL:\n\n```python\n>>> ibis.to_sql(g)\nSELECT\n  \"t1\".\"species\",\n  \"t1\".\"island\",\n  \"t1\".\"count\"\nFROM (\n  SELECT\n    \"t0\".\"species\",\n    \"t0\".\"island\",\n    COUNT(*) AS \"count\"\n  FROM \"penguins\" AS \"t0\"\n  GROUP BY\n    1,\n    2\n) AS \"t1\"\nORDER BY\n  \"t1\".\"count\" ASC\n```\n\nYou can mix SQL and Python code:\n\n```python\n>>> a = t.sql(\"SELECT species, island, count(*) AS count FROM penguins GROUP BY 1, 2\")\n>>> a\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 species   \u2503 island    \u2503 count \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 string    \u2502 string    \u2502 int64 \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Adelie    \u2502 Torgersen \u2502    52 \u2502\n\u2502 Adelie    \u2502 Biscoe    \u2502    44 \u2502\n\u2502 Adelie    \u2502 Dream     \u2502    56 \u2502\n\u2502 Gentoo    \u2502 Biscoe    \u2502   124 \u2502\n\u2502 Chinstrap \u2502 Dream     \u2502    68 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n>>> b = a.order_by(\"count\")\n>>> b\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 species   \u2503 island    \u2503 count \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 string    \u2502 string    \u2502 int64 \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Adelie    \u2502 Biscoe    \u2502    44 \u2502\n\u2502 Adelie    \u2502 Torgersen \u2502    52 \u2502\n\u2502 Adelie    \u2502 Dream     \u2502    56 \u2502\n\u2502 Chinstrap \u2502 Dream     \u2502    68 \u2502\n\u2502 Gentoo    \u2502 Biscoe    \u2502   124 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nThis allows you to combine the flexibility of Python with the scale and performance of modern SQL.\n\n## Backends\n\nIbis supports nearly 20 backends:\n\n- [Apache DataFusion](https://ibis-project.org/backends/datafusion/)\n- [Apache Druid](https://ibis-project.org/backends/druid/)\n- [Apache Flink](https://ibis-project.org/backends/flink)\n- [Apache Impala](https://ibis-project.org/backends/impala/)\n- [Apache PySpark](https://ibis-project.org/backends/pyspark/)\n- [BigQuery](https://ibis-project.org/backends/bigquery/)\n- [ClickHouse](https://ibis-project.org/backends/clickhouse/)\n- [DuckDB](https://ibis-project.org/backends/duckdb/)\n- [Exasol](https://ibis-project.org/backends/exasol)\n- [MySQL](https://ibis-project.org/backends/mysql/)\n- [Oracle](https://ibis-project.org/backends/oracle/)\n- [Polars](https://ibis-project.org/backends/polars/)\n- [PostgreSQL](https://ibis-project.org/backends/postgresql/)\n- [RisingWave](https://ibis-project.org/backends/risingwave/)\n- [SQL Server](https://ibis-project.org/backends/mssql/)\n- [SQLite](https://ibis-project.org/backends/sqlite/)\n- [Snowflake](https://ibis-project.org/backends/snowflake)\n- [Trino](https://ibis-project.org/backends/trino/)\n\n## How it works\n\nMost Python dataframes are tightly coupled to their execution engine. And many databases only support SQL, with no Python API. Ibis solves this problem by providing a common API for data manipulation in Python, and compiling that API into the backend\u2019s native language. This means you can learn a single API and use it across any supported backend (execution engine).\n\nIbis broadly supports two types of backend:\n\n1. SQL-generating backends\n2. DataFrame-generating backends\n\n![Ibis backend types](./docs/images/backends.png)\n\n## Portability\n\nTo use different backends, you can set the backend Ibis uses:\n\n```python\n>>> ibis.set_backend(\"duckdb\")\n>>> ibis.set_backend(\"polars\")\n>>> ibis.set_backend(\"datafusion\")\n```\n\nTypically, you'll create a connection object:\n\n```python\n>>> con = ibis.duckdb.connect()\n>>> con = ibis.polars.connect()\n>>> con = ibis.datafusion.connect()\n```\n\nAnd work with tables in that backend:\n\n```python\n>>> con.list_tables()\n['penguins']\n>>> t = con.table(\"penguins\")\n```\n\nYou can also read from common file formats like CSV or Apache Parquet:\n\n```python\n>>> t = con.read_csv(\"penguins.csv\")\n>>> t = con.read_parquet(\"penguins.parquet\")\n```\n\nThis allows you to iterate locally and deploy remotely by changing a single line of code.\n\n> \ud83d\udca1 **Tip**\n>\n> Check out [the blog on backend agnostic arrays](https://ibis-project.org/posts/backend-agnostic-arrays/) for one example using the same code across DuckDB and BigQuery.\n\n## Community and contributing\n\nIbis is an open source project and welcomes contributions from anyone in the community.\n\n- Read [the contributing guide](https://github.com/ibis-project/ibis/blob/main/docs/CONTRIBUTING.md).\n- We care about keeping the community welcoming for all. Check out [the code of conduct](https://github.com/ibis-project/ibis/blob/main/CODE_OF_CONDUCT.md).\n- The Ibis project is open sourced under the [Apache License](https://github.com/ibis-project/ibis/blob/main/LICENSE.txt).\n\nJoin our community by interacting on GitHub or chatting with us on [Zulip](https://ibis-project.zulipchat.com/).\n\nFor more information visit https://ibis-project.org/.\n\n## Governance\n\nThe Ibis project is an [independently governed](https://github.com/ibis-project/governance/blob/main/governance.md) open source community project to build and maintain the portable Python dataframe library. Ibis has contributors across a range of data companies and institutions.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The portable Python dataframe library",
    "version": "10.0.0",
    "project_urls": {
        "Chat": "https://ibis-project.zulipchat.com",
        "Documentation": "https://ibis-project.org",
        "Homepage": "https://ibis-project.org",
        "Issues": "https://github.com/ibis-project/ibis/issues",
        "Repository": "https://github.com/ibis-project/ibis"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8cb9f2c3268aee10a7295d46990fbfced3506b12b63fc1ee4481eed9b94a4f01",
                "md5": "5a49ced65c626f8aa22c3ce72414afc5",
                "sha256": "94f5c4391f14a4d7406b52d8fc12d3a52c5828badc25fa34289f56587da6f76c"
            },
            "downloads": -1,
            "filename": "ibis_framework-10.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a49ced65c626f8aa22c3ce72414afc5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 1913996,
            "upload_time": "2025-02-06T21:07:40",
            "upload_time_iso_8601": "2025-02-06T21:07:40.690903Z",
            "url": "https://files.pythonhosted.org/packages/8c/b9/f2c3268aee10a7295d46990fbfced3506b12b63fc1ee4481eed9b94a4f01/ibis_framework-10.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0a65f5bff0ee716930a3f117c8dd72f14e7e40516ea3932b398c54223696de0a",
                "md5": "e61da8c23e8dfff646b780c284fc43c0",
                "sha256": "c312f1590053d9eb35ce91d31216d21ec66fea4d519b6bb19001b3b30e3e7b3f"
            },
            "downloads": -1,
            "filename": "ibis_framework-10.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e61da8c23e8dfff646b780c284fc43c0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 1210456,
            "upload_time": "2025-02-06T21:07:43",
            "upload_time_iso_8601": "2025-02-06T21:07:43.623732Z",
            "url": "https://files.pythonhosted.org/packages/0a/65/f5bff0ee716930a3f117c8dd72f14e7e40516ea3932b398c54223696de0a/ibis_framework-10.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-06 21:07:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ibis-project",
    "github_project": "ibis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ibis-framework"
}
        
Elapsed time: 1.80757s