# Column Adjustment

Column adjustment will be done in the Prepare tab. All examples on this page utilize the Chat Data Prep function.

<details>

<summary>Move Column</summary>

<img src="/files/0M8omQpU2HYagPpT2EVk" alt="" data-size="original">

Move columns left or right.

**Example Prompt:**\
Move the Spend column 2 columns to the right.

**AI Interpretation:**\
Reorder the columns in the dataset so that the 'Spend' column is moved two positions to the right.

**Example Prompt:**\
Move the Spend column to the left of the Clicks column.

**AI Interpretation:**\
Reorder the columns in the dataset so that the 'Spend' column appears before the 'Clicks' column.

**Example Prompt:**\
Swap the Spend and Views columns locations.

**AI Interpretation:**\
The transform swaps the positions of the 'Spend' and 'Views' columns in the dataset.

**Tips:**

* Specify as close to exact column name as possible.
* Specify exact location to move the column. Prompt "to the right of" rather than "next to."
* Enter either the number of spaces to move, or, the column name to be moved next to.

</details>

<details>

<summary>Add New Column</summary>

<img src="/files/BN0N20s5EMw6e3q1Hss0" alt="" data-size="original">

Add a new column.

**Example Prompt:**\
Add a column for Conversions per View.

**AI Interpretation:**\
The transform calculates the ratio of conversions to views for each row in the dataset and adds a new column called "Conversions\_per\_View" with the calculated values.

**Example Prompt:**\
Add a new column called ROAS.

**AI Interpretation:**\
The transform function adds a new column called "ROAS" to the dataset. The column is initially empty and has a data type of float.

**Example Prompt:**\
Calculate the average CTR and CPC by Campaign. Populate a new column for each, titled CTR\_Benchmark and CPC\_Benchmark, matching the value to it's Campaign.

**AI Interpretation:**\
The transform calculates the average values of the CTR and CPC metrics for each unique Campaign in the dataset. It then adds these average values as new columns to the original dataset.

**Tips:**

* Columns can be created as a function of other columns (sum, subtract, div, ect.).
* If you are trying to produce a column from existing columns in the dataset, specify how in your prompt.
* Use exact column names when combining columns to avoid error.
* Akkio will look for ways to fill the data of your column. If it can not determine the best way to do so, Akkio will leave rows blank.
  * You can delete or change the data for your new column at any time.

</details>

<details>

<summary>Remove Column</summary>

<img src="/files/2PWeqZgZXd6NIkylJ9BD" alt="" data-size="original">

Remove columns from your dataset.

**Example Prompt:** \
Remove the column Ad Type.

**AI Interpretation:** \
Remove the "Ad Type" column from the dataset.

**Example Prompt:** \
Remove majority blank columns.

**AI Interpretation:** \
The transform function removes columns from the dataset that have more than 50% missing values.

**Example Prompt:** \
Remove constant columns.

**AI Interpretation:** \
The transform function removes columns from a dataset that have only one unique value.

**Tips:**

* Akkio can remove specific columns or a type of column specified.
* When removing a group of columns next to each other, specify "between and including" along with the names of the end columns.
* You can specify percentages such as "Remove 90% blank columns" when cleaning.
* The [Clean](https://docs.akkio.com/akkio-docs/prepare-your-data/prepare/clean) function at the top right of Prepare has many pre-made data cleaning operations. Such as removal of blank and unreadable columns.

</details>

<details>

<summary>Rename Column</summary>

<img src="/files/Iot2l5Tlkt4ZQFqanbfz" alt="" data-size="original">

Rename column headers.

**Example Prompt:**\
Rename Placement to Attribution.

**AI Interpretation:**\
Rename the column "Placement" to "Attribution" in the given dataset.

**Example Prompt:**\
Rename CPM, CPC, CTR, CPA, and ROAS.

**AI Interpretation:**\
Rename the columns in the dataset to match the specified names.

**Tips:**

* Akkio's LLM is optimized for marketing agencies and their clients. Common marketing acronyms can be expanded upon in Prepare or [Explore](https://docs.akkio.com/akkio-docs/explore/chat-explore).
* After changing a column name, future prompts should refer to the new column name.

</details>


---

# 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://docs.akkio.com/akkio-docs/master/prompt-library/column-adjustment.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.
