Commit 9fc46275 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

calculate wait time between SLURM job submit and job start; using pandas

parents
%% Cell type:code id: tags:
``` python
!sacct -u $USER -o JobID, Submit,Start --starttime $MM/$DD -n > $FILE
```
%% Cell type:code id: tags:
``` python
import datetime
import csv
import pandas as pd
with open($FILE) as csvfile:
readCSV = csv.reader(csvfile, delimiter=' ')
for row in readCSV:
d1 = pd.to_datetime(row[0], format='%Y-%m-%dT%H:%M:%S')
d2 = pd.to_datetime(row[1], format='%Y-%m-%dT%H:%M:%S')
print(d2-d1)
```
%% Cell type:code id: tags:
``` python
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment