擅长:python、mysql、java
<p>我不知道‘epoch’对您来说是什么,但是一般来说<code>pandas.apply</code>函数就是您想要的。它的工作原理与<code>map</code>在python内置函数中的作用类似。(假设<code>timestamp.epoch</code>返回时间戳的epoch)</p>
<pre><code>import datetime as dt
def helper(val):
time = dt.datetime.strptime(dtstring, '%Y-%m-%d %H:%M:%S.%f')
return dt.epoch()
df['Time'] = df['Time'].apply(helper)
</code></pre>