title: Understanding dataframe.shape df.shape
body: <p>I am taking the udacity data analysis course and i am having trouble understanding an answer. </p>
  
  <p>Have been asked to "create color array for red dataframe". </p>
  
  <p>the answer is </p>
  
  <pre><code>color_red = np.repeat('red', red_df.shape[0])
  </code></pre>
  
  <p>I understand in <code>np.repeat</code>  the first parameter is the input array "red", The second parameter is repeats for each element, <code>red_df.shape[0]</code>. </p>
  
  <p>if <code>np.repeat(3, 4)</code> the return would be <code>array([3, 3, 3, 3])</code>. </p>
  
  <p>Anybody able to set me in the right thought direction?</p>