title: Scipy hstack results in "TypeError: no supported conversion for types: (dtype('float64'), dtype('O'))"
body: <p>I am trying to run hstack to join a column of integer values to a list of columns created by a TF-IDF (so I can eventually use all of these columns/features in a classifier).</p>
  
  <p>I'm reading in the column using pandas, checking for any NA values and converting them to the largest value in the dataframe like so :</p>
  
  <pre><code>  OtherColumn = p.read_csv('file.csv', delimiter=";", na_values=['?'])[["OtherColumn"]]
    OtherColumn = OtherColumn.fillna(OtherColumn.max())
    OtherColumn = OtherColumn.convert_objects(convert_numeric=True)
  </code></pre>
  
  <p>Then I read in my text column and run TF-IDF to create loads of features :</p>
  
  <pre><code>  X = list(np.array(p.read_csv('file.csv', delimiter=";"))[:,2])
  
    tfv = TfidfVectorizer(min_df=3,  max_features=None, strip_accents='unicode',  
          analyzer='word',token_pattern=r'\w{1,}',ngram_range=(1, 2), use_idf=1,smooth_idf=1,sublinear_tf=1)
    tfv.fit(X)
  </code></pre>
  
  <p>Finally, I want to join them all together, and this is where our error occurs and the program cannot run, and also I am unsure whether I am using the StandardScaler appropriately here : </p>
  
  <pre><code>  X =  sp.sparse.hstack((X, OtherColumn.values)) #error here
    sc = preprocessing.StandardScaler().fit(X)
    X = sc.transform(X)
    X_test = sc.transform(X_test)
  </code></pre>
  
  <p>Full error message: </p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-13-79d1e70bc1bc&gt; in &lt;module&gt;()
  ---&gt; 47 X =  sp.sparse.hstack((X, OtherColumn.values))
       48 sc = preprocessing.StandardScaler().fit(X)
       49 X = sc.transform(X)
  
  C:\Users\Simon\Anaconda\lib\site-packages\scipy\sparse\construct.pyc in hstack(blocks, format, dtype)
      421 
      422     """
  --&gt; 423     return bmat([blocks], format=format, dtype=dtype)
      424 
      425 
  
  C:\Users\Simon\Anaconda\lib\site-packages\scipy\sparse\construct.pyc in bmat(blocks, format, dtype)
      537     nnz = sum([A.nnz for A in blocks[block_mask]])
      538     if dtype is None:
  --&gt; 539         dtype = upcast(*tuple([A.dtype for A in blocks[block_mask]]))
      540 
      541     row_offsets = np.concatenate(([0], np.cumsum(brow_lengths)))
  
  C:\Users\Simon\Anaconda\lib\site-packages\scipy\sparse\sputils.pyc in upcast(*args)
       58             return t
       59 
  ---&gt; 60     raise TypeError('no supported conversion for types: %r' % (args,))
       61 
       62 
  
  TypeError: no supported conversion for types: (dtype('float64'), dtype('O'))
  </code></pre>