title: Pandas cast all object columns to category
body: <p>I want to have ha elegant function to cast all object columns in a pandas data 
  frame to categories</p>
  
  <p><code>df[x] = df[x].astype("category")</code> performs the type cast
  <code>df.select_dtypes(include=['object'])</code> would sub-select all categories columns. However this results in a loss of the other columns / a manual merge is required. Is there a solution which "just works in place" or does not require a manual cast?</p>
  
  <h1>edit</h1>
  
  <p>I am looking for something similar as <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.convert_objects.html" rel="noreferrer">http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.convert_objects.html</a> for a conversion to categorical data</p>