---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://catboost.ai/docs/en/concepts/python-features-data_get-feature-names.md
  - href: en/concepts/python-features-data_get-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

# get_feature_names

<!-- source: en/_includes/work_src/reusage-python/get_feature_names-desc.md -->
Return the names of features from the dataset.
<!-- endsource: en/_includes/work_src/reusage-python/get_feature_names-desc.md -->


## Method call format {#call-format}

```python
get_feature_names()
```

## Type of return value {#output-format}

List of strings.

## Usage examples {#usage-examples}

#### Feature names are not set

```python
import numpy as np
from catboost import FeaturesData

fd = FeaturesData(
    num_feature_data=np.array([[1, 4, 5, 6], [4, 5, 6, 7], [30, 40, 50, 60]], dtype=np.float32),
    cat_feature_data=np.array([["a", "b"], ["a", "b"], ["c", "d"]], dtype=object)
)
# print feature names
# the returned value is ['', '', '', '', '', ''] as neither num_feature_names nor cat_feature_names are specified
print(fd.get_feature_names())
```

#### Feature names are set

```python
import numpy as np
from catboost import FeaturesData

fd = FeaturesData(
    num_feature_data=np.array([[1, 4, 5, 6], [4, 5, 6, 7], [30, 40, 50, 60]], dtype=np.float32),
    num_feature_names=['num_feat0', 'num_feat1', 'num_feat2', 'num_feat3'],
    cat_feature_data=np.array([["a", "b"], ["a", "b"], ["c", "d"]], dtype=object),
    cat_feature_names=['cat_feat0', 'cat_feat1']
)
# prints ['num_feat0', 'num_feat1', 'num_feat2', 'num_feat3', 'cat_feat0', 'cat_feat1']
print(fd.get_feature_names())
```

