Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get datafram colum names as list python

# Method 1
list(df)

# Method 2
df.columns.values.tolist()

# Method 3 - list comprehension
[col for col in df]
 
PREVIOUS NEXT
Tagged: #datafram #colum #names #list #python
ADD COMMENT
Topic
Name
3+9 =