DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas drop all columns except certain ones
df.drop(df.columns.difference(['a','b']), 1, inplace=True)
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#pandas
#drop
#columns
ADD COMMENT
Topic
COMMENT
Name
9+4 =
Submit