importSACCTinfo.ipynb 1.5 KB
Newer Older
William Stonewall Monroe's avatar
William Stonewall Monroe committed
1
2
3
4
{
 "cells": [
  {
   "cell_type": "code",
William Monroe's avatar
William Monroe committed
5
   "execution_count": null,
6
   "metadata": {},
William Stonewall Monroe's avatar
William Stonewall Monroe committed
7
8
9
10
11
12
13
14
15
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import pandas_profiling"
   ]
  },
  {
   "cell_type": "code",
William Monroe's avatar
William Monroe committed
16
   "execution_count": null,
17
   "metadata": {},
William Stonewall Monroe's avatar
William Stonewall Monroe committed
18
19
20
21
22
23
24
   "outputs": [],
   "source": [
    "df = pd.read_csv('userusage.txt',delimiter='|')"
   ]
  },
  {
   "cell_type": "code",
William Monroe's avatar
William Monroe committed
25
   "execution_count": null,
26
   "metadata": {},
William Monroe's avatar
William Monroe committed
27
   "outputs": [],
William Stonewall Monroe's avatar
William Stonewall Monroe committed
28
29
30
31
32
33
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
William Monroe's avatar
William Monroe committed
34
   "execution_count": null,
35
   "metadata": {},
William Monroe's avatar
William Monroe committed
36
   "outputs": [],
William Stonewall Monroe's avatar
William Stonewall Monroe committed
37
38
39
40
41
42
43
44
   "source": [
    "df[['jid','step']] = df.JobID.str.split(\".\",expand=True) \n",
    "df.Partition.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
45
   "metadata": {},
William Monroe's avatar
William Monroe committed
46
   "outputs": [],
William Stonewall Monroe's avatar
William Stonewall Monroe committed
47
48
49
50
51
52
53
54
55
56
57
   "source": [
    "batchDF=df.dropna(subset=[\"MaxRSS\"])\n",
    "userDF=df.dropna(subset=[\"User\"])\n",
    "for jid in df.jid.unique():\n",
    "    userDF['MaxRSS'][userDF['jid'] == jid]=batchDF['MaxRSS'][batchDF['jid'] == jid]\n",
    "    \n",
    "    #print(userDF[userDF['jid'] == jid])\n",
    "    \n",
    "userDF.head()"
   ]
  },
William Monroe's avatar
William Monroe committed
58
59
60
61
62
63
64
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# add more graphs here\n"
   ]
  },
William Stonewall Monroe's avatar
William Stonewall Monroe committed
65
66
67
68
69
70
71
72
73
74
75
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
76
   "pygments_lexer": "ipython3"
William Stonewall Monroe's avatar
William Stonewall Monroe committed
77
78
79
80
81
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}