🔵 🔵 🔵


Primary

၊၊||၊|။

DataFrame.columns ⚬|Documentation|1st|20251021020236-00-⌔

pandas.DataFrame.columns — pandas 2.3.3 documentation#pandas.DataFrame.columns

DataFrame.columns

The column labels of the DataFrame.

This property holds the column names as a pandas Index object. It provides an immutable sequence of column labels that can be used for data selection, renaming, and alignment in DataFrame operations.

Returns:
pandas.Index

The column labels of the DataFrame.

See also:
DataFrame.index

The index (row labels) of the DataFrame.

DataFrame.axes

Return a list representing the axes of the DataFrame.

Examples:
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
>>> df
       A  B
0    1  3
1    2  4
>>> df.columns
Index(['A', 'B'], dtype='str')

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •