Commit 7f001f13 authored by KOMAL BADI's avatar KOMAL BADI
Browse files

importing the shared database

parent 76b7a2bb
%% Cell type:code id: tags:
```
import sqlite3
import slurm2sql
import pandas as pd
```
%% Cell type:code id: tags:
```
db = sqlite3.connect('test.db')
db = sqlite3.connect('/data/rc/rc-team/slurm-since-March-allocation.sqlite3')
```
%% Cell type:code id: tags:
```
slurm2sql.slurm2sql(db, ['-S', '2020-03-18', '-a'])
#slurm2sql.slurm2sql(db, ['-S', '2020-04-10', '-a'])
```
%% Cell type:code id: tags:
```
# For example, you can then convert to a dataframe:
df1 = pd.read_sql('SELECT * FROM slurm', db)
```
%% Cell type:code id: tags:
```
df1.head(5)
```
%% Cell type:code id: tags:
```
print("more plots to come")
df1['ReqMemCPU']=df1['ReqMemCPU']/(1024*1024*1024)
```
%% Cell type:code id: tags:
```
```
......
Supports Markdown
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