Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas query return column

df_new = df.query('col1==1 & col2=="x" ')[['col1', 'col3']]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #query #return #column
ADD COMMENT
Topic
Name
9+1 =