title: How to broadcast and assign a series of values across all columns in a Pandas dataframe?
body: <p>I know this must be easy but I can't figure it out or find an existing answer on this...</p>
  
  <p>Say I have this dataframe...</p>
  
  <pre><code>&gt;&gt;&gt; import pandas as pd
  &gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; dates = pd.date_range('20130101', periods=6)
  &gt;&gt;&gt; df = pd.DataFrame(np.nan, index=dates, columns=list('ABCD'))
  &gt;&gt;&gt; df
               A   B   C   D
  2013-01-01 NaN NaN NaN NaN
  2013-01-02 NaN NaN NaN NaN
  2013-01-03 NaN NaN NaN NaN
  2013-01-04 NaN NaN NaN NaN
  2013-01-05 NaN NaN NaN NaN
  2013-01-06 NaN NaN NaN NaN
  </code></pre>
  
  <p>It's easy to set the values of one series...</p>
  
  <pre><code>&gt;&gt;&gt; df.loc[:, 'A'] = pd.Series([1,2,3,4,5,6], index=dates)
  &gt;&gt;&gt; df
              A   B   C   D
  2013-01-01  1 NaN NaN NaN
  2013-01-02  2 NaN NaN NaN
  2013-01-03  3 NaN NaN NaN
  2013-01-04  4 NaN NaN NaN
  2013-01-05  5 NaN NaN NaN
  2013-01-06  6 NaN NaN NaN
  </code></pre>
  
  <p>But how do I set the values of all columns using broadcasting?</p>
  
  <pre><code>&gt;&gt;&gt; default_values = pd.Series([1,2,3,4,5,6], index=dates)
  &gt;&gt;&gt; df.loc[:, :] = default_values
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/Users/billtubbs/anaconda/envs/py36/lib/python3.6/site-packages/pandas/core/indexing.py", line 189, in __setitem__
      self._setitem_with_indexer(indexer, value)
    File "/Users/billtubbs/anaconda/envs/py36/lib/python3.6/site-packages/pandas/core/indexing.py", line 651, in _setitem_with_indexer
      value=value)
    File "/Users/billtubbs/anaconda/envs/py36/lib/python3.6/site-packages/pandas/core/internals.py", line 3693, in setitem
      return self.apply('setitem', **kwargs)
    File "/Users/billtubbs/anaconda/envs/py36/lib/python3.6/site-packages/pandas/core/internals.py", line 3581, in apply
      applied = getattr(b, f)(**kwargs)
    File "/Users/billtubbs/anaconda/envs/py36/lib/python3.6/site-packages/pandas/core/internals.py", line 940, in setitem
      values[indexer] = value
  ValueError: could not broadcast input array from shape (6) into shape (6,4)
  </code></pre>
  
  <p>Other than these ways:</p>
  
  <pre><code>&gt;&gt;&gt; for s in df:
  ...     df.loc[:, s] = default_values
  ... 
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>&gt;&gt;&gt; df.loc[:, :] = np.vstack([default_values]*4).T
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>Or:</p>
  
  <pre><code>&gt;&gt;&gt; df.loc[:, :] = default_values.values.reshape(6,1)
  </code></pre>