{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#### PYT-DS SAISOFT\n", "\n", "\"Barry\n", "\n", "# DATA SCIENCE WITH PYTHON\n", "\n", "### FROM A FAMOUS TUTORIAL\n", "\n", "From Chris Fonnesbeck's Advanced Statistical Computing open Github course material for his Vanderbilt University course [Bios8366](https://github.com/fonnesbeck/Bios8366).\n", "\n", "I've seen this stash recommended in articles designed to steer us towards the best materials. I appreciate such guidance and pass on what to me seems on target." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "url = (\"https://raw.githubusercontent.com/fonnesbeck/Bios8366/\"\n", " \"master/data/microbiome.csv\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "bacteria = pd.read_csv(url)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "bacteria.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "bacteria.set_index(['Taxon', 'Patient'], inplace=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "bacteria" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "bacteria.sort_values(by=\"Tissue\", axis=0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### LAB:\n", "\n", "Sort in patient order how?" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "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.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }