title: Apply if and else to the condition which the data frame is or is not empty pandas
body: <p>I am trying to apply new columns to a data frame if it is not empty. Let say <code>no_result</code> is the pandas data frame. If it is empty, it will return empty data frame. If it is not empty and consists of 1 column, then I want to add two new extra columns with "output1" and "output2". So the data frame will be either empty, or something like below:</p>
  
  <pre><code>   0        1        2
  0  A  output1  output2
  1  B  output1  output2
  </code></pre>
  
  <p>I tried something like this below:</p>
  
  <pre><code>if no_result = []: 
          no_result = []
          return no_result
  else
          no_result[1] = 'output1'
          no_result[2] = 'output2'
          return no_result
  </code></pre>
  
  <p>it shows syntax error. How can I return the data frame? Thanks in advance.</p>