Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

exclude columns pandas

df = df[df.columns[~df.columns.isin(['column_to_exclude'])]]
Comment

exclude columns in df

df2 = df[df.columns.difference(['B', 'D'])]
Comment

PREVIOUS NEXT
Code Example
Python :: check pip version 
Python :: add x axis label python 
Python :: python read file csv 
Python :: mongodb python get all documents 
Python :: pandas datetime now 
Python :: display max rows pandas 
Python :: split string in the middle python 
Python :: how to add images in hml while using flask 
Python :: edge driver selenium python 
Python :: change false to true python 
Python :: version of scikit learn 
Python :: python -m pip install --upgrade 
Python :: how to align text in tkinter 
Python :: business logic in django 
Python :: get python version in code 
Python :: Python tkinter window fullscreen with title bar 
Python :: change background color of tkinter 
Python :: python r squared 
Python :: How to check how much time elapsed Python 
Python :: size table python 
Python :: how to minimize command console python 
Python :: tkinter start maximized 
Python :: slugify python 
Python :: last element in dictionary python 
Python :: how to see the functions of a library in python 
Python :: python degrees to radians 
Python :: python flat list from list of list 
Python :: plot value counta 
Python :: python print error traceback 
Python :: filter startswith django 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =