# dequote

## Overview

The `dequote` statement is used to remove quotes from the start and end of column names and values&#x20;

## Syntax

**`dequote`***`dset.id`*

## Details

In cases where data from a 3rd-party system is formatted in such a way that the quoting in the CSV cannot be dealt with during  [import](/data-pipelines/transform/language/import.md) it is necessary to use [option noquote](/data-pipelines/transform/language/option.md) to treat the quotes as if they were data and import the file 'as is'.

The `dequote` statement can then be used to remove quotes after import. Only cell values (and column names) where there is a quote both at the start and end will be modified and any quotes present in the middle of those values will be left untouched.

The `dequote` statement will use whichever quote character is defined by [option quote](/data-pipelines/transform/language/option.md). The default is a double quote: `"`

## `Example`

The following example data cannot be imported without using [option noquote](/data-pipelines/transform/language/option.md) due to the presence of the unescaped embedded quotes in the `note` column on lines 2 and 7:

```
"account","account2","service","quantity","rate","note","interval","instance"
"Acc1","Subacc1","ServiceX","100","1","Embedded "quote"","monthly","Instance"
"Acc1","Subacc2","ServiceY","100","1","Inactive","daily","Instance2"
"Acc1","Subacc2","ServiceY","100","1","Inactive","daily","Instance2"
"Acc1","Subacc2","ServiceY","100","1","Active","daily","Instance2"
"Acc1","Subacc3","ServiceZ","100","1","Active","individually","Instance3"
"Acc1","Subacc3","ServiceZ","100","1","More ""quotes""","individually","Instance3"
"Acc1","Subacc3","ServiceZ","100","1","Active","individually","Instance3"
"Acc2","Subacc4","ServiceX","100","1","Inactive","monthly","Instance"
"Acc2","Subacc4","ServiceY","100","1","Inactive","daily","Instance2"
"Acc2","Subacc4","ServiceZ","100","1","Active","individually","Instance3"
```

The following script demonstrates the use of `option noquote` and `dequote` to import the data regardless:

```
option noquote
import system/extracted/example.csv source example alias data
dequote example.data
export example.data as DEQUOTED.CSV
```

Note that `dequote` will leave the embedded quotes untouched. This means that statements such as [replace](/data-pipelines/transform/language/replace.md) can be used to remove or modify them as required.

The resulting exported file from the example script above contains the following:

```
account,account2,service,quantity,rate,note,interval,instance
Acc1,Subacc1,ServiceX,100,1,Embedded "quote",monthly,Instance
Acc1,Subacc2,ServiceY,100,1,Inactive,daily,Instance2
Acc1,Subacc2,ServiceY,100,1,Inactive,daily,Instance2
Acc1,Subacc2,ServiceY,100,1,Active,daily,Instance2
Acc1,Subacc3,ServiceZ,100,1,Active,individually,Instance3
Acc1,Subacc3,ServiceZ,100,1,More ""quotes"",individually,Instance3
Acc1,Subacc3,ServiceZ,100,1,Active,individually,Instance3
Acc2,Subacc4,ServiceX,100,1,Inactive,monthly,Instance
Acc2,Subacc4,ServiceY,100,1,Inactive,daily,Instance2
Acc2,Subacc4,ServiceZ,100,1,Active,individually,Instance3
```


---

# 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://olddocs.exivity.io/data-pipelines/transform/language/dequote.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.
