title: Change type of pandas series/dataframe column inplace
body: <p><strong>TL;DR</strong>: I'd like to change the data types of pandas dataframe columns in-place.</p>
  
  <hr>
  
  <p>I have a pandas dataframe:</p>
  
  <pre><code>df = pd.DataFrame({'a': [1,2,3], 'b': [4,5,6.1]})
  </code></pre>
  
  <p>Which by default gets its columns assigned 'int64' and 'float64' on my system:</p>
  
  <pre><code>df.dtypes
  Out[172]: 
  a      int64
  b    float64
  dtype: object
  </code></pre>
  
  <p>Because my dataframe will be very large, I'd like to set the column data types, after having created the dataframe, to int32 and float32. I know how I could do this:</p>
  
  <pre><code>df['a'] = df['a'].astype(np.int32)
  df['b'] = df['b'].astype(np.float32)
  </code></pre>
  
  <p>or, in one step:  </p>
  
  <pre><code>df = df.astype({'a':np.int32, 'b':np.float32})
  </code></pre>
  
  <p>and the dtypes of my dataframe are indeed:</p>
  
  <pre><code>df.dtypes
  Out[180]: 
  a      int32
  b    float32
  dtype: object
  </code></pre>
  
  <p><strong>However</strong>: this seems clunky, having to reassign the series, esp. since many pandas methods have an <code>inplace</code> kwarg. Using this, however, doesn't seem to work (starting out with the same dataframe at the top):</p>
  
  <pre><code>df['a'].astype(np.int32, inplace=True)
  
  df.dtypes
  Out[187]: 
  a      int64
  b    float64
  dtype: object
  </code></pre>
  
  <p>Is there something I'm overlooking here? Is this by design? The same behaviour is shown when working with <code>Series</code> instead of <code>DataFrame</code> objects.</p>
  
  <p>Many thanks,</p>