Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

select columns from dataframe pandas

df = df.iloc[:,0:2] # this selects first two columns
df = df[['column1', 'column2']]
 
PREVIOUS NEXT
Tagged: #select #columns #dataframe #pandas
ADD COMMENT
Topic
Name
9+5 =