title: CQL TypeError: Received an argument of invalid type for column
body: <p>I am using <code>Cassandra Python driver</code>, and I created a table, in the table there is a column (called date) defined as <code>timestamp</code>. I tried to access values from a dataframe and insert rows into the table using these values. The dataframe value corresponding to date has the format (captured from <code>PyCharm</code> debug mode),</p>
  
  <p><code>Timestamp('2006-09-29 00:00:00')</code> </p>
  
  <p>But I got the following error,</p>
  
  <pre><code>TypeError: Received an argument of invalid type for column "date". Expected: &lt;class 'cassandra.cqltypes.DateType'&gt;, Got: &lt;class 'str'&gt;; (DateType arguments must be a datetime, date, or timestamp)
  </code></pre>
  
  <p>The table is defined as,</p>
  
  <pre><code>CREATE TABLE test_keyspace.test_table (
  key1 text PRIMARY KEY,
  key2 float,
  key3 text,
  key4 text,
  key5 text,
  date timestamp
  ) WITH bloom_filter_fp_chance = 0.01
  AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
  AND comment = ''
  AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
  AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  AND crc_check_chance = 1.0
  AND dclocal_read_repair_chance = 0.1
  AND default_time_to_live = 0
  AND gc_grace_seconds = 864000
  AND max_index_interval = 2048
  AND memtable_flush_period_in_ms = 0
  AND min_index_interval = 128
  AND read_repair_chance = 0.0
  AND speculative_retry = '99PERCENTILE';
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>The problem is due to there are NaTs in the dataframe and forgot to remove them before insert them into cassandra.</p>