koalas

Koalas: pandas API on Apache Spark

Github星跟蹤圖

The Koalas project makes data scientists more productive when interacting with big data, by implementing the pandas DataFrame API on top of Apache Spark.

pandas is the de facto standard (single-node) DataFrame implementation in Python, while Spark is the de facto standard for big data processing. With this package, you can:

  • Be immediately productive with Spark, with no learning curve, if you are already familiar with pandas.
  • Have a single codebase that works both with pandas (tests, smaller datasets) and with Spark (distributed datasets).

This project is currently in beta and is rapidly evolving, with a bi-weekly release cadence. We would love to have you try it and give us feedback, through our mailing lists or GitHub issues.

Try the Koalas 10 minutes tutorial on a live Jupyter notebook here. The initial launch can take up to several minutes.

Github Actions
Travis CI
codecov
Documentation Status
Latest Release
Conda Version
Binder

Getting Started

The recommended way of installing Koalas is Conda as below.

conda install koalas -c conda-forge

You can use not only Conda but also multiple ways to install Koalas. See Installation for full instructions to install Koalas.

If you are a Databricks Runtime user, you can install Koalas using the Libraries tab on the cluster UI, or using dbutils in a notebook as below, for the regular Databricks Runtime.

dbutils.library.installPyPI("koalas")
dbutils.library.restartPython()

Note that Koalas requires Databricks Runtime 5.x or above. In the future, we will package Koalas out-of-the-box in both the regular Databricks Runtime and Databricks Runtime for Machine Learning.

Now you can turn a pandas DataFrame into a Koalas DataFrame that is API-compliant with the former:

import databricks.koalas as ks
import pandas as pd

pdf = pd.DataFrame({'x':range(3), 'y':['a','b','b'], 'z':['a','b','b']})

# Create a Koalas DataFrame from pandas DataFrame
df = ks.from_pandas(pdf)

# Rename the columns
df.columns = ['x', 'y', 'z1']

# Do some operations in place:
df['x2'] = df.x * df.x

For more details, see Getting Started and Dependencies in the official documentation.

Contributing Guide

See Contributing Guide and Design Principles in the official documentation.

FAQ

See FAQ in the official documentation.

Best Practices

See Best Practices in the official documentation.

主要指標

概覽
名稱與所有者databricks/koalas
主編程語言Python
編程語言Python (語言數: 2)
平台
許可證Apache License 2.0
所有者活动
創建於2019-01-03 21:46:54
推送於2024-03-20 15:33:34
最后一次提交2023-09-21 12:12:16
發布數49
最新版本名稱v1.8.2 (發布於 )
第一版名稱v0.0.5 (發布於 )
用户参与
星數3.4k
關注者數318
派生數365
提交數1.6k
已啟用問題?
問題數590
打開的問題數99
拉請求數1448
打開的拉請求數11
關閉的拉請求數171
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?