DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+5 =
Submit