擅长:python、mysql、java
<p>在这里转换成float不是很有用。但是,您可以将datetime对象转换为timestamp对象。在</p>
<p>考虑到第[0]行包含一个datetime对象,下面这样的方法应该有效:</p>
<pre><code>import time
timestamp = time.mktime((row[0].timetuple())
</code></pre>
<p><code>timestamp</code>将是从datetime对象生成的UTC时间戳。在</p>
<p><strong>更新:</strong></p>
<p>观察到第[0]行包含字符串格式的日期。在</p>
^{pr2}$