title: Insert rows into pandas DataFrame while maintaining column data types
body: <p>What's the best way to insert new rows into an existing pandas DataFrame while maintaining column data types and, at the same time, giving user-defined fill values for columns that aren't specified?  Here's an example:</p>
  
  <pre><code>df = pd.DataFrame({
      'name': ['Bob', 'Sue', 'Tom'],
      'age': [45, 40, 10],
      'weight': [143.2, 130.2, 34.9],
      'has_children': [True, True, False]
  })
  </code></pre>
  
  <p>Assume that I want to add a new record passing just <code>name</code> and <code>age</code>.  To maintain data types, I can copy rows from <code>df</code>, modify values and then append <code>df</code> to the copy, e.g.</p>
  
  <pre><code>columns = ('name', 'age')
  copy_df = df.loc[0:0, columns].copy()
  copy_df.loc[0, columns] = 'Cindy', 42
  new_df = copy_df.append(df, sort=False).reset_index(drop=True)
  </code></pre>
  
  <p>But that converts the <code>bool</code> column to an object.</p>
  
  <p>Here's a really hacky solution that doesn't feel like the "right way" to do this:</p>
  
  <pre><code>columns = ('name', 'age')
  copy_df = df.loc[0:0].copy()
  
  missing_remap = {
      'int64': 0,
      'float64': 0.0,
      'bool': False,
      'object': ''
  }
  for c in set(copy_df.columns).difference(columns)):
      copy_df.loc[:, c] = missing_remap[str(copy_df[c].dtype)]
  
  new_df = copy_df.append(df, sort=False).reset_index(drop=True)
  new_df.loc[0, columns] = 'Cindy', 42
  </code></pre>
  
  <p>I know I must be missing something.</p>