# Getting started
source: https://docs.chalk.ai/docs/chalkdf/getting-started

## Install Chalk DataFrames and calculate spending by user.

### Installation

Install `chalkdf` with `uv pip` on Python 3.11 through 3.15 on Linux or macOS 15 or later.

```bash
uv pip install chalkdf
```

### Run your first query

Start a Python session. Create three transactions, then select the columns needed to calculate spending. Keep transactions of at least 10 and sum them by user.

```python
from chalk import _
from chalkdf import DataFrame

tx = DataFrame({"user": ["a", "a", "b"], "amount": [12, 8, 30]})

totals = (
    tx.select("user", "amount")
    .filter(_.amount >= 10)
    .agg(["user"], _.amount.sum().alias("total"))
)
users = DataFrame({"user": ["a", "b"], "name": ["Ari", "Bo"]})
totals.join(users, on=["user"], how="inner").select("name", "total").order_by("name").run()
```

| name · `string` | total · `int64` |
| --------------- | --------------- |
| Ari             | 12              |
| Bo              | 30              |

The transaction for 8 drops out before the aggregation. Call [`run()`](/dataframe-docs#DataFrame.run) to execute the plan and inspect its rows. The join attaches the name for each user. For other ways to match records, see [Joins and as-of joins](/docs/chalkdf/transformations/joins). To start from a file, see [Files](/docs/chalkdf/io/files).

Read [Expressions and contexts](/docs/chalkdf/concepts/expressions) to learn how `_` refers to the input of each operation. Browse the [API reference](/dataframe-docs) for method signatures.

To submit a DataFrame plan to a worker and retrieve its results, see [Run Remotely](/docs/chalkdf/remote-execution).

### Call a deployed function on each row

Use a deployed function's return value as a DataFrame column with [`F.catalog_call`](/api-docs#catalog_call). Pass the input columns as arguments, then submit the plan to Chalk. The [catalog call guide](/docs/functions/calling-from-a-dataframe) shows a complete remote query and a static resolver that extracts named entities from transaction memos.





