Skip to main content

Koalas: pandas API on Apache Spark

Project description

pandas API on Apache Spark
Explore Koalas docs »

Live notebook · Issues · Mailing list
Help Thirsty Koalas Devastated by Recent Fires

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).

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 codecov Documentation Status Latest Release Conda Version Binder Downloads

Getting Started

Koalas can be installed in many ways such as Conda and pip.

# Conda
conda install koalas -c conda-forge
# pip
pip install koalas

See Installation for more details.

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()

For Databricks Runtime for Machine Learning 6.0 and above, you can install it as follows.

%sh
pip install koalas

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.

Lastly, if your PyArrow version is 0.15+ and your PySpark version is lower than 3.0, it is best for you to set ARROW_PRE_0_15_IPC_FORMAT environment variable to 1 manually. Koalas will try its best to set it for you but it is impossible to set it if there is a Spark context already launched.

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.

Koalas Talks and Blogs

See Koalas Talks and Blogs in the official documentation.

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

koalas-1.3.0.tar.gz (312.1 kB view details)

Uploaded Source

Built Distribution

koalas-1.3.0-py3-none-any.whl (630.4 kB view details)

Uploaded Python 3

File details

Details for the file koalas-1.3.0.tar.gz.

File metadata

  • Download URL: koalas-1.3.0.tar.gz
  • Upload date:
  • Size: 312.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for koalas-1.3.0.tar.gz
Algorithm Hash digest
SHA256 658f7dbbd0ba88262ffa63c6b6eb716898849bf6e04c3f2a9f9f5f2146d52a25
MD5 1a77d9b0b942c43ed73f16a3a2adda32
BLAKE2b-256 f9ded3af94491d1f0835d7d48b895fa16bf8ac58b8d9b4103c7d7d4f3c5da5b0

See more details on using hashes here.

File details

Details for the file koalas-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: koalas-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 630.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for koalas-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77b6d7d686744734b4c6f64258442b75e38ecf103e518fea5c273b6e1fc053a6
MD5 627ca8d79dbdd0df65f3cbc81e40f236
BLAKE2b-256 6394a0170904362b4a80022468413acc8073146ac40cbbe6d5490c4db22ccd73

See more details on using hashes here.

Supported by

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