# QGIS: Змінити значення рядка на число в shapefile

У QGIS ви можете перетворити рядок на число за допомогою інструмента «Калькулятор полів». Спочатку відкрийте таблицю атрибутів для шару, який ви хочете змінити. Далі натисніть кнопку «Відкрити калькулятор полів». У полі «Вираз» введіть «to\_real(», а потім назву поля, яке містить рядок, який ви хочете перетворити, і закрийте дужку. Наприклад, щоб перетворити текстове поле з назвою «string\_field» на числове поле, введіть «to\_real("string\_field")» у полі Вираз. Також ви можете змінити назву вихідного поля та тип даних, вибравши відповідні параметри. Нарешті, натисніть «OK», щоб завершити перетворення. Початкове текстове поле залишиться в таблиці атрибутів, а нове числове поле буде додано до таблиці.

<figure><img src="/files/6cae1ee7e854cc16c840cfc33fc6072a1011490e" alt=""><figcaption></figcaption></figure>

1. Відкрити «Властивості»
2. Перейдіть до «Калькулятора полів»
3. Позначте «Оновити наявне поле»
4. to\_real("attributeName")
5. Зберегти зміни
6. Повторіть те саме для кожного атрибута

   <figure><img src="/files/e4e276e20201a10bb96a01ad5e2e2c844b64326f" alt=""><figcaption></figcaption></figure>


---

# 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.geopard.tech/geopard-tutorials/ukrainian/korotki-pidkazki-gis/qgis-zminiti-znachennya-ryadka-na-chislo-v-shapefile.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.
