---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://catboost.ai/docs/en/concepts/python-reference_catboostclassifier_set_feature_names.md
  - href: en/concepts/python-reference_catboostclassifier_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 {#example}

<!-- 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 CatBoostClassifier

train_data = [[0, 3],
              [4, 1],
              [8, 1],
              [9, 1]]
train_labels = [0, 0, 1, 1]

model = CatBoostClassifier(loss_function='Logloss')
model.fit(train_data, train_labels, verbose=False)

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

```

Output:

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

