title: Sending Pandas Dataframe with Int64 type to GCP Spanner INT64 column
body: <p>I am using Pandas Dataframes. I have a column from a CSV which is integers mixed in with nulls.</p>
  
  <p>I am trying to convert this and insert it into Spanner in as generalizable a way as possible(so I can use the same code for future jobs), which reduces my ability to use sentinel variables. However, DFs cannot handle <code>NaN</code>s in a pure int column so you have to use <code>Int64</code>. When I try to insert this into Spanner I get an error that it is not an <code>int64</code> type, whereas pure Python <code>int</code>s do work. Is there an automatic way to convert <code>Int64</code> Pandas values to <code>int</code> values during the insert? Converting the column before inserting doesn't work, again, because of the null values. Is there another path around this?</p>
  
  <p>Trying to convert from a Series goes like so:</p>
  
  <pre><code>&gt;&gt;&gt;s2=pd.Series([3.0,5.0])
  &gt;&gt;&gt;s2
  0    3.0
  1    5.0
  dtype: float64
  &gt;&gt;&gt;s1=pd.Series([3.0,None])
  &gt;&gt;&gt;s1
  0    3.0
  1    NaN
  dtype: float64
  &gt;&gt;&gt;df = pd.DataFrame(data=[s1,s2], dtype=np.int64)
  &gt;&gt;&gt;df
     0    1
  0  3  NaN
  1  3  5.0
  &gt;&gt;&gt;df = pd.DataFrame(data={"nullable": s1, "nonnullable": s2}, dtype=np.int64)
  </code></pre>
  
  <p>this last command produces the error <code>ValueError: Cannot convert non-finite values (NA or inf) to integer</code></p>