title: Check if Column Has String Object Then Convert to Numeric
body: <p>I need to check if a column in my dataframe is of type 'object' and then based on that information, change all the values in that column to an integer. Here is the function I wrote to do that:</p>
  
  <pre><code>def multiply_by_scalar(self):
      self.columns_to_index()
  
      i = ask_user("What column would you like to multiply by a scalar? Please type in index:\n", int)
      m = ask_user("Type in the value of the scalar:\n", int)
  
      if self.df.columns[i] == np.object:
          print("{} is of type 'object'. Scalar multiplication can only be applied to dtypes of type 'numeric'.".format(self.df.columns[i]))
          c = ask_user("Would you like to convert column '{}' to type 'int'?".format(self.df.columns[i]))
          if c in yes_values:
              pd.to_numeric(self.df.columns[i])
              self.df.columns[i] = self.df.columns[i].multiply(m)
              print(self.df.columns[i])
      else:
          self.df.columns[i] = self.df.columns[i].multiply(m)
          print(self.df.columns[i])
  </code></pre>
  
  <p>NOTE: The <code>self.columns_to_index()</code> is a function in the program that maps each column name to an index and it is not important information to answer the question. </p>
  
  <p>When I run this function, I get the error: </p>
  
  <p><code>AttributeError: 'str' object has no attribute 'multiply</code></p>
  
  <p>Demonstrating that the conversion from a string to an integer did not work.</p>