> For the complete documentation index, see [llms.txt](https://water-strategy.gitbook.io/waterstrategy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://water-strategy.gitbook.io/waterstrategy/portugues/tutoriais/pywr-scenarios-reading-external-dataframe-and-adding-custom-rules/reading-csv-dataframe.md).

# Lendo CSV DataFrame

Vá para **Lançamento de novo reservatório** nodo e mudança **Fluxo máximo** para **-400**, isso permitirá o fluxo de água através desse nó

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-6420f89ca94eb65a3717127f5a057a71036890d3%2Fimage%20(2)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-d865c3314b236c878e80f37455d84879d7e5d3ec%2Fimage%20(5)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

O arquivo baixado, **Tâmisa\_Lee\_Vale\_demand.csv**, contém um conjunto de dados de séries temporais estruturado com duas colunas principais:

**etapa de tempo:** Essa coluna servirá como índice para a série temporal. Ela representa a progressão do tempo no conjunto de dados, permitindo a organização cronológica.

**Demanda de Lee Valley:** Essa coluna contém os dados que representam os valores da demanda no Vale Lee.

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-6ff2c6c50da13881ba949629c3c9e866042620c5%2Fimage%20(3)%20(1)%20(1).png?alt=media" alt="" width="443"><figcaption><p><strong>Tâmisa_Lee_Valley_Demand</strong></p></figcaption></figure>

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-b935e0b126a1fa027985428bcb768660f1e4f19d%2Fimage%20(4)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

Selecione o nó de saída **Demanda de Lee Valley** e edite o **Fluxo máximo**

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-6a33f97b4cd180208ec2bc2382b3af1084576456%2Fimage%20(5)%20(1)%20(1).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Em Opções, selecione **PYWR\_PARAMETER**

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-6bcdcee83a916021c64825325e516b8652a1176b%2Fimage%20(6)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

Cole a seguinte configuração:

```json
{
	“tipo”: “DataFrameParameter”,
	“url”: “Tâmisa_Lee_Valley_demand.csv “,
	“coluna”: “Demanda de Lee Valley”,
	“index_col”: “etapa de tempo”,
	“parse_dates”: verdadeiro
}
```

Agora, ela deve ter a seguinte aparência:

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-84e9550faf636e8fe09ae9c29546483aece993b8%2Fimage%20(7)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

### Resultados

Clique no nó Lee Valley Demand > Outputs > simulated\ \_flow para ver os resultados da simulação

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-2c2acdf9f5b2f1add124601b8c05d3946c26102c%2Fimage%20(38).png?alt=media" alt="" width="475"><figcaption></figcaption></figure>

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-0064235a1421501d36e942ee6607d0676b5bd6a4%2Fimage%20(36).png?alt=media" alt=""><figcaption><p>simulated_flow (Demanda de Lee Valley)</p></figcaption></figure>

Agora, verifique o **simulado\_volume** pelo **Novo reservatório**

<figure><img src="https://2780811623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4nCBOybr5foLIqkmwa6%2Fuploads%2Fgit-blob-5ea22e9ba5b69183bcaef39bdb72fb02f3ab8baf%2Fimage%20(37).png?alt=media" alt=""><figcaption><p>volume simulado (Novo reservatório)</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://water-strategy.gitbook.io/waterstrategy/portugues/tutoriais/pywr-scenarios-reading-external-dataframe-and-adding-custom-rules/reading-csv-dataframe.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
