Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

or condition in pandas

df1 = df[(df.a != -1) & (df.b != -1)]
Comment

or condition in pandas

df2 = df[(df.a != -1) | (df.b != -1)]
Comment

PREVIOUS NEXT
Code Example
Python :: geometrical mean python 
Python :: how to find total no of nan values in pandas 
Python :: webbrowser python 
Python :: count occurrences of value in array python 
Python :: radio button pyqt 
Python :: python download youtube video 
Python :: TypeError: cannot unpack non-iterable int object 
Python :: plotly heatmap with label 
Python :: int object is not subscriptable in python 
Python :: # Take user input in python 
Python :: python ordered dictionary 
Python :: clear text box tkinter python 
Python :: pandas read cell value by index and column name 
Python :: add time to datetime python 
Python :: df reset index 
Python :: python run all tests 
Python :: discord.py embeds 
Python :: adf test python 
Python :: round up division python 
Python :: generate n different random numbers python 
Python :: feature scaling in python 
Python :: integer colomn to datetime pandas 
Python :: python get item from queue 
Python :: pandas read from txt separtion 
Python :: matplotlib cheatsheet 
Python :: python get file path from in os.walk 
Python :: close python window after execution 
Python :: datetime to int in pandas 
Python :: numpy inverse square root 
Python :: how to take input complex number in python 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =