Set callback_instances' timestamp & duration cols to datetime/timedelta

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
Christophe Bedard 2021-03-31 14:50:17 -04:00
parent 3ed8f0ed1d
commit f9ef14e058
4 changed files with 17 additions and 11 deletions

View file

@ -127,7 +127,8 @@
" duration.xaxis[0].formatter = DatetimeTickFormatter(seconds=['%Ss'])\n",
"\n",
" # Histogram\n",
" dur_hist, edges = np.histogram(duration_df['duration'])\n",
" # (convert to milliseconds)\n",
" dur_hist, edges = np.histogram(duration_df['duration'] * 1000 / np.timedelta64(1, 's'))\n",
" duration_hist = pd.DataFrame({\n",
" 'duration': dur_hist, \n",
" 'left': edges[:-1], \n",