{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## pandasプロット(鋭意制作中)\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# python用のパッケージ\n", "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt \n", "import seaborn as sns\n", "%matplotlib inline\n", "\n", "# jupyter用のdisplayメソッド\n", "from IPython.display import display, Latex, HTML, Math, JSON" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# 9章のデータをRからJSON形式に変換\n", "d = pd.read_json('''\n", "[{\"x\":3,\"y\":5},{\"x\":3.2105,\"y\":3},{\"x\":3.4211,\"y\":6},{\"x\":3.6316,\"y\":7},{\"x\":3.8421,\"y\":7},\n", " {\"x\":4.0526,\"y\":5},{\"x\":4.2632,\"y\":9},{\"x\":4.4737,\"y\":9},{\"x\":4.6842,\"y\":7},{\"x\":4.8947,\"y\":10},\n", " {\"x\":5.1053,\"y\":12},{\"x\":5.3158,\"y\":8},{\"x\":5.5263,\"y\":7},{\"x\":5.7368,\"y\":4},{\"x\":5.9474,\"y\":4},\n", " {\"x\":6.1579,\"y\":11},{\"x\":6.3684,\"y\":9},{\"x\":6.5789,\"y\":9},{\"x\":6.7895,\"y\":8},{\"x\":7,\"y\":6}]\n", "''')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
| \n", " | x | \n", "y | \n", "
|---|---|---|
| count | \n", "20.000000 | \n", "20.000000 | \n", "
| mean | \n", "5.000000 | \n", "7.300000 | \n", "
| std | \n", "1.245486 | \n", "2.408319 | \n", "
| min | \n", "3.000000 | \n", "3.000000 | \n", "
| 25% | \n", "3.999975 | \n", "5.750000 | \n", "
| 50% | \n", "5.000000 | \n", "7.000000 | \n", "
| 75% | \n", "6.000025 | \n", "9.000000 | \n", "
| max | \n", "7.000000 | \n", "12.000000 | \n", "