title: Pandas DataFrame column assignment ValueError: Wrong number of items passed
body: <p>I am having an issue with a script that was functioning prior to an upgrade of Anaconda (thus an upgrade of pandas and numpy)</p>
  
  <p>I have a DataFrame that I would like to use one column from and multiply by the values in a column of another DataFrame, outputting the final value to a column in a new DataFrame. As I said this code was working until I upgraded to pandas 0.17. </p>
  
  <pre><code>class MarketOnClosePortfolio(Portfolio):
      def __init__(self, symbol, bars, signals, initial_capital=10000.0):
          self.symbol = symbol
          self.bars = bars
          self.signals = signals
          self.initial_capital = float(initial_capital)
          self.positions = self.generate_positions()
  
      def generate_positions(self):
          positions = pd.DataFrame(index=signals.index).fillna(0.0)
          positions[self.symbol] = signals['signal']*10
  
          return positions        
  
      def backtest_portfolio(self):
          portfolio = self.positions*self.bars['Close']
          pos_diff = self.positions.diff()
  
          portfolio = pd.DataFrame(index=signals.index)
          portfolio['holdings'] = (self.positions*self.bars['Close'])
          portfolio['cash'] = self.initial_capital - (pos_diff*self.bars['Close']).sum(axis=1).cumsum()
  
          portfolio['total'] = portfolio['cash'] + portfolio['holdings']
          portfolio['returns'] = portfolio['total'].pct_change()
  
          return portfolio
  
  if __name__ == "__main__":
      portfolio = MarketOnClosePortfolio(symbol, bars, signals, initial_capital=10000.0)
      returns = portfolio.backtest_portfolio()
  </code></pre>
  
  <p>My error comes in when trying to execute <code>returns = portfolio.backtest_portfolio()</code> referring back to <code>portfolio['holdings'] = self.positions*self.bars['Close']</code> and returns </p>
  
  <blockquote>
    <p>ValueError: Wrong number of items passed 3509, placement implies 1.</p>
  </blockquote>
  
  <p>self.positions has this appearance (its index is around 3600):</p>
  
  <pre><code>    Symbol
  1    int
  2    int
  3    int
  </code></pre>
  
  <p>self.bars.Close has this apperance (same index size as self.positions):</p>
  
  <pre><code>    Close
  1   float
  2   float
  3   float
  </code></pre>
  
  <p>Am i overlooking something obvious here? I know I am passing a series and not a single value, but i am confused why i am getting "placement implies 1" out. </p>
  
  <p>Any help is greatly appreciated. </p>