From f7cadbc2a10a7a59975fdadf8ffa2abd985d9c4e Mon Sep 17 00:00:00 2001 From: Saisri Vegesna <saisri@uab.edu> Date: Mon, 30 Mar 2020 11:02:33 -0500 Subject: [PATCH] Upload New File --- importSACCTinfo.ipynb | 160 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 importSACCTinfo.ipynb diff --git a/importSACCTinfo.ipynb b/importSACCTinfo.ipynb new file mode 100644 index 0000000..8ec103c --- /dev/null +++ b/importSACCTinfo.ipynb @@ -0,0 +1,160 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "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", + "execution_count": null, + "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", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2020-03-16T20:57:11.932878Z", + "start_time": "2020-03-16T20:57:11.905219Z" + } + }, + "outputs": [], + "source": [ + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2020-03-16T20:57:14.154962Z", + "start_time": "2020-03-16T20:57:11.967976Z" + } + }, + "outputs": [], + "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" + } + }, + "outputs": [], + "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()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# add more graphs here\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.5" + }, + "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 +} -- GitLab