> 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/russkii/uchebnye-posobiya/pywr-scenarios-reading-external-dataframe-and-adding-custom-rules/reading-csv-dataframe.md).

# Чтение CSV-фрейма данных

Перейти к **Выпуск нового резервуара** узел и изменение **Максимальный расход** к **-400**, это позволит пропускать воду через этот узел

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

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

Загруженный файл, **Темза\_Ли\_Долина\_demand.csv** содержит набор данных временных рядов, структурированный двумя ключевыми столбцами:

**временной шаг:** Этот столбец будет служить индексом временного ряда. Он отражает ход времени в наборе данных, что позволяет упорядочить данные в хронологическом порядке.

**Спрос в долине Ли:** В этом столбце содержатся данные, отражающие значения спроса в долине Ли.

<figure><img src="https://3817892601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn9Lkjv9vPu8czwmW2MeG%2Fuploads%2Fgit-blob-6ff2c6c50da13881ba949629c3c9e866042620c5%2Fimage%20(3)%20(1)%20(1).png?alt=media" alt="" width="443"><figcaption><p><strong>Темза_подветренный_Спрос на долину</strong></p></figcaption></figure>

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

Выберите выходной узел **Спрос в долине Ли** и отредактируйте **Максимальный расход**

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

В разделе Опции выберите **ПИВР\_ПАРАМЕТР**

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

Вставьте следующую конфигурацию:

```json
{
	«тип»: «Параметр фрейма данных»,
	«url»: «Темза»_подветренный_Valley_demand.csv «,
	«колонка»: «Спрос в долине Ли»,
	«index_col»: «временной шаг»,
	«parse_dates»: правда
}
```

Теперь оно должно выглядеть следующим образом:

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

### Результаты

Нажмите на узел Lee Valley Demand > Outputs > Simulated\ \_flow, чтобы увидеть результаты моделирования

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

<figure><img src="https://3817892601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn9Lkjv9vPu8czwmW2MeG%2Fuploads%2Fgit-blob-0064235a1421501d36e942ee6607d0676b5bd6a4%2Fimage%20(36).png?alt=media" alt=""><figcaption><p>simulated_flow (спрос в долине Ли)</p></figcaption></figure>

Теперь проверьте **смоделировано\_объем** для **Новое водохранилище**

<figure><img src="https://3817892601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn9Lkjv9vPu8czwmW2MeG%2Fuploads%2Fgit-blob-5ea22e9ba5b69183bcaef39bdb72fb02f3ab8baf%2Fimage%20(37).png?alt=media" alt=""><figcaption><p>смоделированный объем (новое водохранилище)</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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
