Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python use variable inside pandas query

myval1 = 'A A'
newdf = df.query("col2 == @myval1")
Source by www.listendata.com #
 
PREVIOUS NEXT
Tagged: #python #variable #pandas #query
ADD COMMENT
Topic
Name
2+4 =