A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/5801 below:

datetime with datetime ops very slow · Issue #5801 · pandas-dev/pandas · GitHub

In [1]: df = pd.DataFrame({ 'date1' : pd.Timestamp('20130101'), 'date2' : pd.date_range('20120101',periods=1000000,freq='s') })

In [2]: %timeit df['date1']-df['date2']
1 loops, best of 3: 2.17 s per loop

pretty easy fix; don't need to infer if its a series (as we know its dtype already)

should be more like this

In [3]: %timeit Series(df['date1'].astype('int64')-df['date2'].astype('int64'),dtype='m8[ns]')
10 loops, best of 3: 43 ms per loop

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4