# Stack

In this document, you’ll learn how to use the *Stack* transformation in Astera Dataprep to combine multiple columns into a single column for easier analysis.

Suppose you have a dataset containing patient glucose readings across different times of the day. By applying Stack, you can merge these time-specific columns into one **Glucose** **Level** column, with an additional **Category** column indicating the time of measurement, making the data easier to analyze and visualize.

![](/files/bceOL2MalQsCm14GJmng)

1. To apply Stack in Astera Dataprep, click on the *Transform* option in the toolbar and select *Stack* from the drop-down.

![](/files/HBZzriuX8I3lCg665Ntd)

2. Once selected, the *Recipe Configuration – Stack* panel will open.

<img src="/files/NR3jHfXZznrQLfUfygFs" alt="" width="413">

* **Column Name:** Select the column(s) you want to stac&#x6B;**.**
* **Stacking Option:** Defines how values and identifiers are combined when stacking columns.
  * **Repeat:** Repeats identifier or reference values for each stacked entry.
  * **Stack:** Merges values without repeating identifiers.

<img src="/files/7LaF1kGTwQjmfKvgw48l" alt="" width="409">

* **Category:** Specify the category column to label each stacked group.

<img src="/files/qxj1OBQCZMBQb31OOELJ" alt="" width="413">

3. Once done, click <img src="/files/87Jq7LNPIYwtUvUMXvZK" alt="" data-size="line"> *Apply*.
4. Now, in the grid, you can see that all glucose measurements are combined into a single column, with a corresponding category indicating the time of day they were taken.

![](/files/zVdLQee1Tki51DOwFbGg)

{% hint style="info" %}
**Tip:** You can also ask in Chat something like *“Combine all glucose level columns into one column and add a Time of Day category”* and Dataprep will configure it for you automatically.
{% endhint %}

![](/files/o8UGcgXnJ9bznag9iSOy)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/dataprep/transforming-data/stack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
