Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

filter dataframe columns vy a list of columns

df.loc[:, df.columns.isin(['nnn', 'mmm', 'yyy', 'zzzzzz'])]

   yyy  nnn  mmm
0   10    5    5
1    9    3    4
2    8    7    0
Comment

PREVIOUS NEXT
Code Example
Python :: pygame get mouse position 
Python :: python pie chart 
Python :: numpy development 
Python :: python create new pandas dataframe with specific columns 
Python :: print today time python 
Python :: python open each file in directory 
Python :: images from opencv displayed in blue 
Python :: how to find element in selenium by class 
Python :: how to check for a particular word in a text file using python 
Python :: python set cwd to file location 
Python :: count unique values numpy 
Python :: discord.py make command admin only 
Python :: alphabet list python 
Python :: perfect number in python 
Python :: python sort dictionary alphabetically by key 
Python :: python flask query params 
Python :: run django app locally 
Python :: how to install python3 in ubuntu 
Python :: np array n same values 
Python :: user agents list 
Python :: remove whitespace around figure matplotlib 
Python :: print type of exception python 
Python :: SSL: CERTIFICATE_VERIFY_FAILED with Python3 
Python :: hello world python 
Python :: np euclidean distance python 
Python :: insertion sort python 
Python :: godot white shader 
Python :: pandas group by concat 
Python :: random word generator python 
Python :: python get ros package path 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =