From 346c4f766539d813e957491e05603d47a76258fb Mon Sep 17 00:00:00 2001 From: Tommy Date: Tue, 6 Mar 2018 22:32:24 +0100 Subject: [PATCH] Added a template for a cheat sheet --- cheat_sheet/Cheat Sheet.ipynb | 103 ++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 cheat_sheet/Cheat Sheet.ipynb diff --git a/cheat_sheet/Cheat Sheet.ipynb b/cheat_sheet/Cheat Sheet.ipynb new file mode 100644 index 0000000..ab64c47 --- /dev/null +++ b/cheat_sheet/Cheat Sheet.ipynb @@ -0,0 +1,103 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Pandas Cheat Sheet" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Table of contents\n", + "\n", + "\n", + "- **The setup**: anaconda, Python, pandas, Jupyter\n", + "- **Importing data**: from csv (and options), from the web, creating from scratch, convering types, rename cols\n", + "- **Summarizing data**: len(df), shape, value_counts, head, tail, max(), min(), mean, dtype, info(), describe(), memory_usage(), scatter matrix, corr, isnull, notnull, unique(), nlargest\n", + "- **Selecting and computing**: select subset of row and cols, .loc, .iloc, drop columns, assign, apply/map/applymap, multiindex\n", + "- **Filtering and sorting**: >=, AND, OR, ==, ~, str.contains, str.startswith, sort_values, sort_index, filtering on sorted/unsorted, isin()\n", + "- **Split-apply-combine and pivots**: groupby, dt.month, dt.year, groupby.mean(), agg, stack, unstack, pivot, melt, merge\n", + "- **Time series manipulations**: downsampling, upsampling, rolling, mean, simple plotting\n", + "- **Plotting**: built-in plotting, advanced plotting, matplotlib, seaborn, styles, saving\n", + "- **Modeling and machine learning**: .value, feeding data, saving data\n", + "- **Misc tips and tricks**: pandas options, vectorization, timings with %%timeit, profiling with lprun\n", + "\n", + "**principles:** small examples, no more than 5 rows. one or two data sets, no more." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "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.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}