Ibis defines a Python dataframe API that executes on any query engine – the frontend for any backend data platform, with 20+ backends today. This allows Ibis to have excellent performance – as good as the backend it is connected to – with a consistent user experience.
What is Ibis?
Ibis is the portable Python dataframe library.
We can demonstrate this with a simple example on a few local query engines:
import ibis
ibis.options.interactive = True
DuckDB
Polars
DataFusion
PySpark
1con = ibis.connect("duckdb://")
t = con.read_parquet("penguins.parquet")
t.limit(3)
Ibis is for data engineers, data analysts, and data scientists (or any title that needs to work with data!) to use directly with their data platform(s) of choice. It also has benefits fordata platforms,organizations, andlibrary developers.
Ibis for practitioners
You can use Ibis at any stage of your data workflow, no matter your role.
Data engineerscan use Ibis to:
write and maintain complex ETL/ELT jobs
replace fragile SQL string pipelines with a robust Python API
replace PySpark with a more Pythonic API that supports Spark and many other backends
Data analystscan use Ibis to:
use Ibis interactive mode for rapid exploration
perform rapid exploratory data analysis using interactive mode
work in a general-purpose, yet easy to learn, programming language without the need for formatting SQL strings
Data scientistscan use Ibis to:
extract a sample of data for local iteration with a fast local backend
prototype with the same API that will be used in production
preprocess and feature engineer data before training a machine learning model
Ibis for data platforms
Data platforms can use Ibis to quickly bring a fully-featured Python dataframe library with minimal effort to their platform. In addition to a great Python dataframe experience for their users, they also get integrations into thebroader Python and ML ecosystem.
Often, data platforms evolve to support Python in some sequence like:
Develop a fast query engine with a SQL frontend
Gain popularity and need to support Python for data science and ML use cases
Develop a bespoke pandas or PySpark-like dataframe library and ML integrations
This third step is where Ibis comes in. Instead of spending a lot of time and money developing a bespoke Python dataframe library, you can create an Ibis backend for your data platformin as little as four hours for an experienced Ibis developeror, more typically, on the order ofoneortwomonths for a new contributor.
Why not the pandas or PySpark APIs?
Ibis for organizations
Organizations can use Ibis to standardize the interface for SQL and Python data practitioners. It also allows organizations to:
transfer data between systems
transform, analyze, and prepare data where it lives
benchmark your workload(s) across data systems using the same code
mix SQL and Python code seamlessly, with all the benefits of a general-purpose programming language, type checking, and expression validation
Ibis for library developers
Python developers creating libraries can use Ibis to:
instantly support 20+ data backends
instantly support pandas, PyArrow, and Polars objects
read and write from all common file formats (depending on the backend)
trace column-level lineage through Ibis expressions
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:
SQL-generating backends
DataFrame-generating backends
As you can see, most backends generate SQL. Ibis usesSQLGlotto transform Ibis expressions into SQL strings. You can also use the.sql()methods to mix in SQL strings, compiling them to Ibis expressions.
While portability with Ibis isn’t perfect, commonalities across backends and SQL dialects combined with years of engineering effort produce a full-featured and robust framework for data manipulation in Python.
In the long-term, we aim for a standard query plan Intermediate Representation (IR) likeSubstraitto simplify this further.
Python + SQL: better together
For most backends, Ibis works by compiling Python expressions into SQL:
g = t.group_by(["species", "island"]).agg(count=t.count()).order_by("count")
ibis.to_sql(g)
SELECT
*
FROM (
SELECT
`t0`.`species`,
`t0`.`island`,
COUNT(*) AS `count`
FROM `ibis_read_parquet_pp72u4gfkjcdpeqcawnpbt6sqq` AS `t0`
GROUP BY
1,
2
) AS `t1`
ORDER BY
`t1`.`count` ASC NULLS LAST
You can mix and match Python and SQL code:
sql = """
SELECT
species,
island,
COUNT(*) AS count
FROM penguins
GROUP BY species, island
""".strip()
DuckDB
DataFusion
PySpark
con = ibis.connect("duckdb://")
t = con.read_parquet("penguins.parquet")
g = t.alias("penguins").sql(sql)
g
This allows you to combine the flexibility of Python with the scale and performance of modern SQL.
Scaling up and out
Out of the box, Ibis offers a great local experience for working with many file formats. You can scale up with DuckDB (the default backend) or choose from other great options like Polars and DataFusion to work locally with large datasets. Once you hit scaling issues on a local machine, you can continue scaling up with a larger machine in the cloud using the same backend and same code.
If you hit scaling issues on a large single-node machine, you can switch to a distributed backend like PySpark, BigQuery, or Trino by simply changing your connection string.
Stream-batch unification
As ofIbis 8.0, the first stream processing backends have been added. Since these systems tend to support SQL, we can with minimal changes to Ibis support both batch and streaming workloads with a single API. We aim to further unify the batch and streaming paradigms going forward.
Ecosystem
Ibis is part of a larger ecosystem of Python data tools. It is designed to work well with other tools in this ecosystem, and we continue to make it easier to use Ibis with other tools over time.
Ibis already works with other Python dataframes like:
Note that theibis-frameworkpackage isnotthe same as theibispackage in PyPI. These two libraries cannot coexist in the same Python environment, as they are both imported with theibismodule name.
See thebackend support matrixfor details on operations supported.Open a feature requestif you’d like to see support for an operation in a given backend. If the backend supports it, we’ll do our best to add it quickly!
Community
Community discussions primarily take place onGitHubandZulip.
오픈AI는 챗GPT(ChatGPT)의 주간 활성 사용자가 2억 명을 돌파했다고 밝혔다. 이는 지난해보다 두 배 증가한 수준이다.
39일 악시오스에 따르면, 포춘 500대 기업 중 92%가 오픈AI 제품을 사용하고 있다. 또 GPT-4o 미니(mini)가 올 7월에 출시된 이후 자동화 API 사용량이 두 배 증가했다.
샘 올트먼 오픈AI 최고경영책임자(CEO)는 “사람들이 우리의 도구를 이제 일상적으로 사용하고 있으며, 이는 의료 및 교육과 같은 분야에서 실질적인 변화를 가져오고 있다”며 “일상적인 업무 지원부터 어려운 문제 해결, 창의성 발현까지 다양한 영역에서 도움을 주고 있다”고 말했다.
오픈AI는 생성형 AI 챗봇 시장에서 선두 자리를 유지하고 있다. 하지만 테크 기업들이 점유율을 높이고자, 서비스를 업데이트하면서 경쟁 격화에 노출된 상태다.
이날 메타(Meta)는 오픈 소스 라마(Llama) 모델의 도입이 급격히 증가했다고 밝혔다. 라마(Llama) 3.1 출시 이후 올해 5월과 7월 사이 주요 클라우드 서비스 제공업체에서의 사용량이 두 배 증가했다는 것이 회사측 설명이다.
우버의 다라 코스로샤히 최고경영자(CEO)가 한국을 방문했습니다. 우버는 2009년 창업한 차량 호출 서비스 기업으로 현재 월간활성사용자수 1억명을 보유하고 있습니다. 우버는 현재 자율주행차에 진심입니다. 현대차와 네이버를 방문!
되살리려는 자율차 플랫폼
사실 우버는 자율주행 차량 개발을 위한 우버 ATG(Advanced Technologies Group)를 운영했지만 경영난에 해당 계열을 오로라(Aurora)에 매각을 했습니다. 하지만 어느정도 정상화로 돌아서자 다시 자율주행에 시동을 거는 모습입니다.
이달들어 영국 인공지능 기업인 웨이브, 그리고 자동차 기업들과 손을 잇따라 손을 잡고 있습니다. 특히 웨이브에는 전략적 투자자로 올해 참여를 했는데요. 이를 활용해 고속도로에서 자율주행이 가능한 레벨3 수준을 달성하겠다는 목표를 세운 상태입니다.
지난달에는 이미 중국 비야디(BYD)와 파트너십을 맺었습니다. BYD 10만대를 향후 5년간 운전자들에게 배치하는 것이 목표인데요. 우버가 추진하고 있는 자율주행 플랫폼에 비야디 차량을 통합하는 것이 주된 목표입니다. 앞서 기아차와도 파트너십을 맺은바 있습니다. 또 GM의 자율주행 계열인 크루즈와도 파트너십.
"2040년에 휘발유차 퇴출"
우버는 크게 오는 2030년까지 미국 캐나다 유럽에서, 2040년까지 전 세계에서 휘발유 차량을 퇴출하는 것이 목표라고 합니다. (현재 한국 우버는 SK스퀘어 자회사 티맵모빌리티와 우버가 각각 41%대 49% 지분을 투자해 운영중입니다.)
코스로샤히 CEO는 "플랫폼 기반으로 미래 기술을 선도하는게 우버의 핵심 가치 중 하나"라면서 "그 중심에 전기차와 자율주행 기술이 있다"고 강조했습니다. 그는 실제로 "우버 운전자들이 미국·캐나다·유럽 등에서 다른 업체보다 5배 빠르게 전기차로 전환하고 있다"고 말했습니다.
🔎크게보기
우버는 드라이버에 수수료 15~30%를 떼지만, 여러 사이트에는 약 42%를 뗀다는 주장도 있습니다. 운전자 입장에서는 많이 떼는 것이겠지만, 우버 입장에서는 비용으로 느낄 수 있지 않을까 합니다. 우버는 현재 다양한 전기차 자율차와 파트너십을 맺고 있는데요. 이렇게 자율주행 차량을 서둘러 도입하려는 이유는 무엇일까요?
우버는 ‘우버 하이브리드 모델’이라고 지칭합니다. 인간 운전자와 자율주행 차가 협업한다는 개념인데요. 드라이버에 더 많은 수수료를 요구할 수 있지 않을까 합니다. 더 먼 미래에는?
보통 어깨가 아프면 목과 어깨 사이를 주무른다. 이때 통증이 사라지는 것처럼 느껴지지만 단기적인 효과일 뿐, 오히려 만성통증을 유발해 어깨 건강을 해칠 수 있다.
◇어깨 통증, 잘못된 자세가 원인
뒷목에서 어깨관절까지 이어지는 승모근은 컴퓨터나 스마트폰 영향을 가장 많이 받는 근육이다. 강남세브란스병원 재활의학과 박중현 교수는 "장시간 화면에 몰두해 목과 허리를 숙이는 자세로 계속 있으면 승모근 등 주변 근육이 긴장한다"며 "이때 목뼈 부담도 커지면서 통증이 발생한다"고 말했다.
이러한 상태가 장기간 이어지면 승모근이 버티지 못하고 무게중심이 앞으로 움직여 거북목 상태로 변하기도 한다. 인천성모병원 재활의학과 김민욱 교수는 "어깨와 목 부분이 아픈데도 계속 잘못된 자세를 유지하면 목 디스크가 돌출될 수도 있어 주의가 필요하다"고 말했다.
◇마사지하면 통증 만성화될 수도
어깨 마사지를 하면 근육 긴장이 풀리고 혈액순환이 촉진돼 어깨 통증이 다소 완화될 수 있다. 하지만 단기적인 효과일 뿐 계속 마사지로만 통증을 풀면 오히려 상태가 나빠질 수 있다. 고대안암병원 스포츠의학센터 이진혁 실장은 "어깨 통증은 근육 뭉침뿐 아니라 근육 손상, 약화 등 원인이 다양하다"며 "마사지만 한다면 근육의 회복 능력이 갈수록 떨어질 수 있어 근본적인 원인을 찾아서 개선해야 한다"고 말했다.
근육 긴장을 풀어주거나 근육 저항성을 강화하지 않고 마사지만 하면 근육이 말랑해진다. 이때 근육은 하중을 견디는 힘이 약해지고 통증은 계속 심해져 자칫 만성통증으로 이어질 수 있다.
◇자세→스트레칭→근력 강화 순으로
어깨 통증을 완화하려면 마사지보다는 가장 먼저 잘못된 자세를 멀리해야 한다. 그중에서도 컴퓨터와 스마트폰은 눈 높이에 맞춰서 사용해야 한다. 박중현 교수는 "고개를 40도 숙이면 승모근에 가해지는 압력이 평소보다 5배로 상승한다"고 말했다.
/그래픽=이철원
스트레칭으로 근육을 풀어주는 것도 좋다. 영국의사협회는 승모근 스트레칭을 위해 ▲목 뒤로 젖히기 ▲벽 짚고 팔 굽혀 펴기 ▲앉은 채로 몸통 꺾기 ▲턱 누르기 4가지 동작을 하루에 5~6회 이상 하라고 권장한다〈그래픽〉.
버틸 수 있는 힘도 길러야 한다. 근육이 저항성을 가지면 통증 유발 상황에서 버틸 수 있기 때문이다. 김민욱 교수는 "실제로 승모근을 강화하면 어깨 만성통증을 해소하는 데 도움이 된다"며 "승모근은 근력보다 지구력이 중요하므로 30~50회 정도 반복할 수 있는 무게로 운동하면 된다"고 말했다. 승모근 강화 운동은 가벼운 우산이나 봉을 어깨보다 좁게 잡고 팔이 어깨와 거의 평행이 되도록 든다. 날개뼈 움직임에 집중하면서 하루 30~50회 2세트 하면 된다.