title: Python Pandas - select dataframe columns where equals
body: <p>What is the Pandas equivalent of this SQL code?</p>
  
  <pre><code>Select id, fname, lname from table where id = 123
  </code></pre>
  
  <p>I know that this is the equivalent of an SQL 'where' clause in Pandas:</p>
  
  <pre><code>df[df['id']==123]
  </code></pre>
  
  <p>And this selects specific columns:</p>
  
  <pre><code>df[['id','fname','lname']]
  </code></pre>
  
  <p>But I can't figure out how to combine them. All examples I've seen online select all columns with conditions. I want to select a limited number of columns with one or more conditions. </p>