# ysv

CSV (Comma Separated Values) is a very common data storage, distribution, and exchange format. It is also very simple and widely supported.

CSV lacks standardization and typing though. Real world datasets oftentimes have inconsistent data formats, separators, quoting, - and if you want to use them you have to spend time tediously cleaning them up. That is major boring nonsense, is it not?

And here comes `ysv`.

{% tabs %}
{% tab title="Input dataset" %}
{% code title="input.csv" %}

```
make,model,year
Ford,Fusion,2016
Chevrolet,Equinox,2013
Toyota,Camry,2018
Infiniti,Q50,2016
Mercedes-Benz,GLE,2020
```

{% endcode %}
{% endtab %}

{% tab title="YAML config" %}
{% code title="vehicles.yaml" %}

```yaml
version: 1
columns:
  year:
    - input: year
  make:
    - input: make
    - uppercase
    - replace:
        MERCEDES-BENZ: MERCEDES
  model:
    - input: model
    - uppercase
```

{% endcode %}
{% endtab %}

{% tab title="Output dataset" %}

```
year,make,model
2016,FORD,FUSION
2013,CHEVROLET,EQUINOX
2018,TOYOTA,CAMRY
2016,INFINITI,Q50
2018,TOYOTA,TUNDRA
2020,MERCEDES,GLE
```

{% endtab %}
{% endtabs %}

In the configuration file, you specify the output dataset you need to get from the tool:

* column names and order
* where to take the data to fill each of the output columns
* and what **transformations** to apply to the data

The resulting dataset may be saved on disk, uploaded to a remote host, imported into a database, - whatever you wish.

## Disclaimer

`ysv` is at alpha stage of development, but it is already being used in production with benefit, which caused me to believe it may be useful to someone else. Feedback is greatly appreciated.


---

# 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://altaisoft.gitbook.io/ysv/master.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.
