importSACCTinfo.ipynb 3.25 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,
William Stonewall Monroe's avatar
William Stonewall Monroe committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-16T20:57:10.405006Z",
     "start_time": "2020-03-16T20:56:55.837670Z"
    }
   },
   "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
21
   "execution_count": null,
William Stonewall Monroe's avatar
William Stonewall Monroe committed
22
23
24
25
26
27
28
29
30
31
32
33
34
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-16T20:57:11.865980Z",
     "start_time": "2020-03-16T20:57:10.414986Z"
    }
   },
   "outputs": [],
   "source": [
    "df = pd.read_csv('userusage.txt',delimiter='|')"
   ]
  },
  {
   "cell_type": "code",
William Monroe's avatar
William Monroe committed
35
   "execution_count": null,
William Stonewall Monroe's avatar
William Stonewall Monroe committed
36
37
38
39
40
41
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-16T20:57:11.932878Z",
     "start_time": "2020-03-16T20:57:11.905219Z"
    }
   },
William Monroe's avatar
William Monroe committed
42
   "outputs": [],
William Stonewall Monroe's avatar
William Stonewall Monroe committed
43
44
45
46
47
48
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
William Monroe's avatar
William Monroe committed
49
   "execution_count": null,
William Stonewall Monroe's avatar
William Stonewall Monroe committed
50
51
52
53
54
55
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-16T20:57:14.154962Z",
     "start_time": "2020-03-16T20:57:11.967976Z"
    }
   },
William Monroe's avatar
William Monroe committed
56
   "outputs": [],
William Stonewall Monroe's avatar
William Stonewall Monroe committed
57
58
59
60
61
62
63
64
65
66
67
68
69
   "source": [
    "df[['jid','step']] = df.JobID.str.split(\".\",expand=True) \n",
    "df.Partition.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2020-03-16T20:56:57.392Z"
    }
   },
William Monroe's avatar
William Monroe committed
70
   "outputs": [],
William Stonewall Monroe's avatar
William Stonewall Monroe committed
71
72
73
74
75
76
77
78
79
80
81
   "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
82
83
84
85
86
87
88
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# add more graphs here\n"
   ]
  },
William Stonewall Monroe's avatar
William Stonewall Monroe committed
89
90
91
92
93
94
95
96
97
98
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
William Monroe's avatar
William Monroe committed
99
   "display_name": "Python 3",
William Stonewall Monroe's avatar
William Stonewall Monroe committed
100
   "language": "python",
William Monroe's avatar
William Monroe committed
101
   "name": "python3"
William Stonewall Monroe's avatar
William Stonewall Monroe committed
102
103
104
105
106
107
108
109
110
111
112
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
William Monroe's avatar
William Monroe committed
113
   "version": "3.7.5"
William Stonewall Monroe's avatar
William Stonewall Monroe committed
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}