{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "time,angular_velocity\n", "0.0,3.236790061330015\n", "0.0020000000000000018,3.2304788385296246\n", "0.003999999999999997,3.2195776355287498\n", "0.005999999999999998,3.2092501800752573\n", "0.008,3.1926115018876944\n", "0.009999999999999995,3.1880215217073844\n", "0.011999999999999997,3.1765465712743266\n", "0.013999999999999999,3.1490066903384144\n", "0.016,3.123188052093832\n" ] } ], "source": [ "!head bicycle-wheel-radial-inertia-rate-gyro-measurement.csv" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "gyro_data = pd.read_csv('bicycle-wheel-radial-inertia-rate-gyro-measurement.csv',\n", " index_col='time')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
angular_velocity
time
0.0003.236790
0.0023.230479
0.0043.219578
0.0063.209250
0.0083.192612
\n", "
" ], "text/plain": [ " angular_velocity\n", "time \n", "0.000 3.236790\n", "0.002 3.230479\n", "0.004 3.219578\n", "0.006 3.209250\n", "0.008 3.192612" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gyro_data.head()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "pandas.core.frame.DataFrame" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(gyro_data)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1001" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(gyro_data)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index(['angular_velocity'], dtype='object')" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gyro_data.columns" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "time\n", "0.000 3.236790\n", "0.002 3.230479\n", "0.004 3.219578\n", "0.006 3.209250\n", "0.008 3.192612\n", " ... \n", "1.992 -0.271675\n", "1.994 -0.207989\n", "1.996 -0.144303\n", "1.998 -0.085207\n", "2.000 -0.030127\n", "Name: angular_velocity, Length: 1001, dtype: float64" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gyro_data['angular_velocity']" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Float64Index([ 0.0, 0.0020000000000000018,\n", " 0.003999999999999997, 0.0059999999999999975,\n", " 0.008, 0.009999999999999995,\n", " 0.011999999999999995, 0.014,\n", " 0.016, 0.018000000000000002,\n", " ...\n", " 1.9820000000000004, 1.984,\n", " 1.9860000000000004, 1.988,\n", " 1.9900000000000004, 1.992,\n", " 1.9940000000000004, 1.996,\n", " 1.9980000000000004, 2.0000000000000004],\n", " dtype='float64', name='time', length=1001)" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gyro_data.index" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
angular_velocity
time
0.0003.236790
0.0023.230479
0.0043.219578
0.0063.209250
0.0083.192612
\n", "
" ], "text/plain": [ " angular_velocity\n", "time \n", "0.000 3.236790\n", "0.002 3.230479\n", "0.004 3.219578\n", "0.006 3.209250\n", "0.008 3.192612" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gyro_data.head()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "%matplotlib widget" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "aa6e1f723c0b490f8743cda241bb823e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gyro_data.plot(style='.')" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "pandas.core.frame.DataFrame" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(gyro_data)" ] } ], "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.7" } }, "nbformat": 4, "nbformat_minor": 4 }