---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://catboost.ai/docs/en/concepts/python-reference_catboostregressor_set_feature_names.md
  - href: en/concepts/python-reference_catboostregressor_set_feature_names.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# set_feature_names

<!-- source: en/_includes/work_src/reusage-python/non_pool__set_feature_names__div.md -->
Set names for all features in the model.
<!-- endsource: en/_includes/work_src/reusage-python/non_pool__set_feature_names__div.md -->

## Method call format {#method-call-format}

```python
set_feature_names(feature_names)
```

## Parameters {#parameters}

### feature_names

#### Description

A one-dimensional array of feature names for each feature. The order and number of specified names must match the ones used in the dataset.

**Possible types**

- ndarray
- list

**Default value**

Required parameter



## Example {#examples}

<!-- source: en/_includes/work_src/reusage-python/example-intro.md -->
The following example outputs the original feature names, changes them and then outputs the updated names.
<!-- endsource: en/_includes/work_src/reusage-python/example-intro.md -->


```python
from catboost import CatBoostRegressor

train_data = [[1, 4, 5, 6],
              [4, 5, 6, 7],
              [30, 40, 50, 60]]

eval_data = [[2, 4, 6, 8],
             [1, 4, 50, 60]]

train_labels = [10, 20, 30]

model = CatBoostRegressor()

model.fit(train_data,
          train_labels,
          verbose=False)

print("Original feature names:")
print(model.feature_names_)
model.set_feature_names(["feature_1", "feature_2", "feature_3", "feature_4"])
print("Changed feature names:")
print(model.feature_names_)

```

Output:

```no-highlight
Original feature names:
['0', '1', '2', '3']
Changed feature names:
['feature_1', 'feature_2', 'feature_3', 'feature_4']
```

