diff --git a/scratch-log-explorations.ipynb b/scratch-log-explorations.ipynb index 999e9a93a4116c007174e84b76ed6f07cb7d43e2..e360063034ca384b035ddab785a1baf9ea6e02d1 100644 --- a/scratch-log-explorations.ipynb +++ b/scratch-log-explorations.ipynb @@ -329,8 +329,30 @@ "metadata": {}, "outputs": [], "source": [ + "# add new column for resolved uids\n", + "df[\"uname\"]=\"\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# set uname for uid\n", "for uid in sorted(df[\"uid\"].unique()):\n", - " print(\"uid: {} name: {}\".format(uid, pwd.getpwuid(int(uid))[0].split(\":\")[0]))" + " uname = pwd.getpwuid(int(uid))[0].split(\":\")[0]\n", + " print(\"uid: {} name: {}\".format(uid, uname))\n", + " df.loc[df[\"uid\"]==uid, [\"uname\"]] = uname" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "df[df[\"uid\"]==10005]" ] }, {