{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%python\n", "import pandas as pd\n", "from beakerx.object import beakerx\n", "df = pd.read_csv('../resources/data/interest-rates.csv')\n", "df = df.set_index('time')\n", "beakerx.rates = df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Display pandas in python:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%python\n", "beakerx.rates" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Display pandas in groovy:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "beakerx.rates" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%python\n", "import pandas as pd\n", "import numpy as np\n", "from beakerx.object import beakerx\n", "a=pd.DataFrame(np.random.rand(10,5),columns=['c'+str(i) for i in range(5)])\n", "a = a.set_index('c0',append=True)\n", "beakerx.rates = a" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Display pandas in python:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%python\n", "beakerx.rates" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Display pandas in groovy:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "beakerx.rates" ] } ], "metadata": { "kernelspec": { "display_name": "Groovy", "language": "groovy", "name": "groovy" }, "language_info": { "codemirror_mode": "groovy", "file_extension": ".groovy", "mimetype": "", "name": "Groovy", "nbconverter_exporter": "", "version": "2.4.3" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": false, "sideBar": false, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": false, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }