---
title: Pandas API on Spark
description: Learn how to use the pandas API on Spark to access data in Databricks.
canonical_url: https://docs.databricks.com/aws/en/pandas/pandas-on-spark
---

# Pandas API on Spark

> [!NOTE]
>
> This feature is available on clusters that run Databricks Runtime 10.0 and above. For clusters that run Databricks Runtime 9.1 LTS and below, use [Koalas](https://docs.databricks.com/aws/en/archive/legacy/koalas.md) instead.

Commonly used by data scientists, [pandas](https://pandas.pydata.org) is a Python package that provides easy-to-use data structures and data analysis tools for the Python programming language. However, pandas does not scale out to big data. Pandas API on Spark fills this gap by providing pandas equivalent APIs that work on Apache Spark. Pandas API on Spark is useful not only for pandas users but also PySpark users, because pandas API on Spark supports many tasks that are difficult to do with PySpark, for example plotting data directly from a PySpark DataFrame.

## Requirements

Pandas API on Spark requires Databricks Runtime 10.0 and above. You access it by using the following `import` statement:

```python
import pyspark.pandas as ps
```

## Notebook

The following notebook shows how to migrate from pandas to pandas API on Spark.

#### pandas to pandas API on Spark notebook

[Get notebook](https://docs.databricks.com/notebooks/source/pandas-to-pandas-api-on-spark-in-10-minutes.html)

## <a id="additional-resources" /> Additional resources

* [Pandas API on Spark overview](https://spark.apache.org/pandas-on-spark/)
* [Pandas API on Spark user guide](https://spark.apache.org/docs/latest/api/python/tutorial/pandas_on_spark/index.html)
* [Migrating from Koalas to pandas API on Spark](https://spark.apache.org/docs/latest/api/python/migration_guide/koalas_to_pyspark.html)
* [Pandas API on Spark reference](https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/index.html)
