├── .gitignore ├── Exercises.ipynb ├── LICENSE ├── README.md ├── Tutorial.ipynb ├── cryptos.xlsx ├── images ├── _1.png ├── _2.png ├── _3.gif ├── _4.gif └── _5.png └── utils.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | 53 | # Translations 54 | *.mo 55 | *.pot 56 | 57 | # Django stuff: 58 | *.log 59 | local_settings.py 60 | db.sqlite3 61 | db.sqlite3-journal 62 | 63 | # Flask stuff: 64 | instance/ 65 | .webassets-cache 66 | 67 | # Scrapy stuff: 68 | .scrapy 69 | 70 | # Sphinx documentation 71 | docs/_build/ 72 | 73 | # PyBuilder 74 | target/ 75 | 76 | # Jupyter Notebook 77 | .ipynb_checkpoints 78 | 79 | # IPython 80 | profile_default/ 81 | ipython_config.py 82 | 83 | # pyenv 84 | .python-version 85 | 86 | # pipenv 87 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 88 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 89 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 90 | # install all needed dependencies. 91 | #Pipfile.lock 92 | 93 | # celery beat schedule file 94 | celerybeat-schedule 95 | 96 | # SageMath parsed files 97 | *.sage.py 98 | 99 | # Environments 100 | .env 101 | .venv 102 | env/ 103 | venv/ 104 | ENV/ 105 | env.bak/ 106 | venv.bak/ 107 | 108 | # Spyder project settings 109 | .spyderproject 110 | .spyproject 111 | 112 | # Rope project settings 113 | .ropeproject 114 | 115 | # mkdocs documentation 116 | /site 117 | 118 | # mypy 119 | .mypy_cache/ 120 | .dmypy.json 121 | dmypy.json 122 | 123 | # Pyre type checker 124 | .pyre/ 125 | -------------------------------------------------------------------------------- /Exercises.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "![rmotr](https://user-images.githubusercontent.com/7065401/52071918-bda15380-2562-11e9-828c-7f95297e4a82.png)\n", 8 | "
\n", 9 | "\n", 10 | "# Exercises\n", 11 | "\n", 12 | "This is a quick demonstration of how exercises work on [Notebooks.ai](https://notebooks.ai)." 13 | ] 14 | }, 15 | { 16 | "cell_type": "markdown", 17 | "metadata": {}, 18 | "source": [ 19 | "![green-divider](https://user-images.githubusercontent.com/7065401/52071924-c003ad80-2562-11e9-8297-1c6595f8a7ff.png)\n", 20 | "\n", 21 | "### Example 1: Solve the add function\n", 22 | "\n", 23 | "Complete the code of the function `add`, that receives 2 numbers and should return the sum of them:" 24 | ] 25 | }, 26 | { 27 | "cell_type": "code", 28 | "execution_count": null, 29 | "metadata": {}, 30 | "outputs": [], 31 | "source": [ 32 | "def add(x, y):\n", 33 | " pass" 34 | ] 35 | }, 36 | { 37 | "cell_type": "markdown", 38 | "metadata": { 39 | "cell_type": "hint" 40 | }, 41 | "source": [ 42 | "You can use the `+` operator to sum numbers." 43 | ] 44 | }, 45 | { 46 | "cell_type": "code", 47 | "execution_count": null, 48 | "metadata": { 49 | "cell_type": "solution" 50 | }, 51 | "outputs": [], 52 | "source": [ 53 | "def add(x, y):\n", 54 | " return x + y" 55 | ] 56 | }, 57 | { 58 | "cell_type": "markdown", 59 | "metadata": {}, 60 | "source": [ 61 | "![purple-divider](https://user-images.githubusercontent.com/7065401/52071927-c1cd7100-2562-11e9-908a-dde91ba14e59.png)" 62 | ] 63 | } 64 | ], 65 | "metadata": { 66 | "kernelspec": { 67 | "display_name": "Python 3", 68 | "language": "python", 69 | "name": "python3" 70 | }, 71 | "language_info": { 72 | "codemirror_mode": { 73 | "name": "ipython", 74 | "version": 3 75 | }, 76 | "file_extension": ".py", 77 | "mimetype": "text/x-python", 78 | "name": "python", 79 | "nbconvert_exporter": "python", 80 | "pygments_lexer": "ipython3", 81 | "version": "3.6.8" 82 | } 83 | }, 84 | "nbformat": 4, 85 | "nbformat_minor": 2 86 | } 87 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### rmotr.com 2 | # Data Science with Python Course 3 | 4 | This material is created for our [Data Science with Python Course](https://rmotr.com/data-science-python-course) -------------------------------------------------------------------------------- /Tutorial.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "![rmotr](https://user-images.githubusercontent.com/7065401/52071918-bda15380-2562-11e9-828c-7f95297e4a82.png)\n", 8 | "
\n", 9 | "\n", 10 | "\n", 12 | "\n", 13 | "# Interactive Notebooks Tutorial\n", 14 | "\n", 15 | "Welcome to Notebooks.ai ❤️, a fully online 🤖, cloud-based ☁️ Data Science environment. All your work, analysis and datasets organized in the same place 🙌.\n", 16 | "\n", 17 | "![purple-divider](https://user-images.githubusercontent.com/7065401/52071927-c1cd7100-2562-11e9-908a-dde91ba14e59.png)" 18 | ] 19 | }, 20 | { 21 | "cell_type": "markdown", 22 | "metadata": {}, 23 | "source": [ 24 | "### Objective of this tutorial:\n", 25 | "\n", 26 | "> **Help you get started with Notebooks.ai for Data Science and Python programming.**\n", 27 | "\n", 28 | "_Need help? Create an [issue](https://github.com/notebooks-ai/notebooks-help)._\n", 29 | "\n", 30 | "![green-divider](https://user-images.githubusercontent.com/7065401/52071924-c003ad80-2562-11e9-8297-1c6595f8a7ff.png)\n", 31 | "\n", 32 | "## Jupyter Notebooks\n", 33 | "\n", 34 | "This document that you're currently reading is a \"Jupyter Notebook\", and you've probably heard about it before. It's like a text document, but you can run code on it! It can also display inline graphs, pull data from Databases or show excel spreadsheets live! Isn't it amazing? 😄 \n", 35 | "\n", 36 | "**Mildly interesting fact of the day:**\n", 37 | "\n", 38 | "> _Jupyter is a nod to 3 languages: Julia, Python, and R._ Source [@jakevdp](https://twitter.com/jakevdp/status/1033071052652302336).\n", 39 | "\n", 40 | "This is a really quick tutorial on how to get started with Jupyter notebooks (and lab). It shouldn't take more than 10 minutes and you'll be writing Python code right away.\n", 41 | "\n", 42 | "### Part 1: everything is a _cell_\n", 43 | "\n", 44 | "Jupyter Notebooks are organized as a set of _\"cells\"_. Each cell can contain different types of content: like Python code (or R, Julia, etc), images or even human readable text (markdown), like the one you're currently reading.\n", 45 | "\n", 46 | "I've left a couple of empty cells below for you to see them:" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": null, 52 | "metadata": {}, 53 | "outputs": [], 54 | "source": [] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "execution_count": null, 59 | "metadata": {}, 60 | "outputs": [], 61 | "source": [] 62 | }, 63 | { 64 | "cell_type": "code", 65 | "execution_count": null, 66 | "metadata": {}, 67 | "outputs": [], 68 | "source": [] 69 | }, 70 | { 71 | "cell_type": "markdown", 72 | "metadata": {}, 73 | "source": [ 74 | "This is another cell containing Markdown (human readable) code. And below, another empty cell:" 75 | ] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "execution_count": null, 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [] 83 | }, 84 | { 85 | "cell_type": "markdown", 86 | "metadata": {}, 87 | "source": [ 88 | "You can edit these cells just by double clicking on them. Try editing the following cell:" 89 | ] 90 | }, 91 | { 92 | "cell_type": "markdown", 93 | "metadata": {}, 94 | "source": [ 95 | "**👉 Double click on me 👈**" 96 | ] 97 | }, 98 | { 99 | "cell_type": "markdown", 100 | "metadata": {}, 101 | "source": [ 102 | "When you double click the cell, it should open an \"edit mode\", and you should see something similar to:\n", 103 | "\n", 104 | "![image](images/_1.png)" 105 | ] 106 | }, 107 | { 108 | "cell_type": "markdown", 109 | "metadata": {}, 110 | "source": [ 111 | "If you're seeing those asterisks, it's because you've correctly entered \"Edit Mode\". Once you've made the changes, you have to \"execute\", or \"run\" the cell to reflect the changes. To do that just click on the little _play_ button on the top menu bar:\n", 112 | "\n", 113 | "![image](images/_2.png)" 114 | ] 115 | }, 116 | { 117 | "cell_type": "markdown", 118 | "metadata": {}, 119 | "source": [ 120 | "Jupyter notebooks are optimized for an efficient workflow. There are many keyboard shortcuts that will let you interact with your documents, run code and make other changes; mastering these shortcuts will speed up your work. For example, there are two shortcuts to execute a cell:\n", 121 | "\n", 122 | "1. `shift + return`: Run cell and advance to the next one.\n", 123 | "2. `ctrl + return`: Run the cell but don't change focus.\n", 124 | "\n", 125 | "\n", 126 | "Try them with the following cell:" 127 | ] 128 | }, 129 | { 130 | "cell_type": "code", 131 | "execution_count": null, 132 | "metadata": {}, 133 | "outputs": [], 134 | "source": [ 135 | "2 + 2" 136 | ] 137 | }, 138 | { 139 | "cell_type": "markdown", 140 | "metadata": {}, 141 | "source": [ 142 | "You can try executing these cells as many times as you want, it won't break anything" 143 | ] 144 | }, 145 | { 146 | "cell_type": "markdown", 147 | "metadata": {}, 148 | "source": [ 149 | "#### `ctrl + Return` effect:\n", 150 | "\n", 151 | "As you can see in the following animation, the code is correctly executed (it returns 4) and the focus (the blue line at the left side of the cell) stays in the same cell.\n", 152 | "\n", 153 | "![ctrl+enter effect](images/_3.gif)\n", 154 | "\n", 155 | "Now compare it to the next shortcut, `shift + return`:\n", 156 | "\n", 157 | "#### `shift + Return` effect:\n", 158 | "\n", 159 | "![shift+enter effect](images/_4.gif)\n", 160 | "\n", 161 | "As you can see, every time I execute code the focus changes to the cell below." 162 | ] 163 | }, 164 | { 165 | "cell_type": "markdown", 166 | "metadata": {}, 167 | "source": [ 168 | "![green-divider](https://user-images.githubusercontent.com/7065401/52071924-c003ad80-2562-11e9-8297-1c6595f8a7ff.png)" 169 | ] 170 | }, 171 | { 172 | "cell_type": "markdown", 173 | "metadata": {}, 174 | "source": [ 175 | "## Part 2: Working with code\n", 176 | "\n", 177 | "Jupyter notebooks have amazing features to include text and images and create beautiful, human readable documents as you've just seen. But their main benefit is working with code. Now we're going to import a few libraries and start experimenting with Python code. We've already done the simple `2 + 2` before, so let's do something a little bit more interesting. First, we need to import `numpy` and `matplotlib`:" 178 | ] 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": null, 183 | "metadata": {}, 184 | "outputs": [], 185 | "source": [ 186 | "import numpy as np\n", 187 | "import matplotlib.pyplot as plt\n", 188 | "%matplotlib inline" 189 | ] 190 | }, 191 | { 192 | "cell_type": "markdown", 193 | "metadata": {}, 194 | "source": [ 195 | "Notebooks.ai include all the most popular Data Science and Deep Learning libraries already installed. And even if there's one missing, you can always install it in your own environment (more on that later). We've just imported these two libraries:\n", 196 | "* `numpy` the most popular Python library for array manipulation and numeric computing\n", 197 | "* `matplotlib` the most popular visualization library in the Python ecosystem.\n", 198 | "\n", 199 | "Let's now execute a few lines of code and generate some plots:" 200 | ] 201 | }, 202 | { 203 | "cell_type": "code", 204 | "execution_count": null, 205 | "metadata": {}, 206 | "outputs": [], 207 | "source": [ 208 | "x = np.linspace(0, 10, 500)\n", 209 | "y = np.cumsum(np.random.randn(500, 6), 0)" 210 | ] 211 | }, 212 | { 213 | "cell_type": "code", 214 | "execution_count": null, 215 | "metadata": {}, 216 | "outputs": [], 217 | "source": [ 218 | "plt.figure(figsize=(12, 7))\n", 219 | "plt.plot(x, y)\n", 220 | "plt.legend('ABCDEF', ncol=2, loc='upper left')" 221 | ] 222 | }, 223 | { 224 | "cell_type": "markdown", 225 | "metadata": {}, 226 | "source": [ 227 | "But what is that 😱? Just random generated datapoints, but you can clearly see how simple is to do numeric processing and plotting with Notebooks.ai." 228 | ] 229 | }, 230 | { 231 | "cell_type": "markdown", 232 | "metadata": {}, 233 | "source": [ 234 | "![green-divider](https://user-images.githubusercontent.com/7065401/52071924-c003ad80-2562-11e9-8297-1c6595f8a7ff.png)\n", 235 | "\n", 236 | "## Part 3: Interacting with data\n", 237 | "\n", 238 | "Notebooks.ai and Jupyter Lab make it really simple to intereact with files in your local storage. These files are securely stored in the cloud and you can access them from anywhere in the world.\n", 239 | "\n", 240 | "To show you the full potential of Notebooks.ai, we're going to pull cryptocurrencies prices from a public API and download them as Excel files, pretty fancy 😎. I need to import two libraries first: `requests` (to pull data from the web) and `pandas` to process it." 241 | ] 242 | }, 243 | { 244 | "cell_type": "code", 245 | "execution_count": null, 246 | "metadata": {}, 247 | "outputs": [], 248 | "source": [ 249 | "import requests\n", 250 | "import pandas as pd" 251 | ] 252 | }, 253 | { 254 | "cell_type": "markdown", 255 | "metadata": {}, 256 | "source": [ 257 | "I have a predefined function that simplifies the process of importing data from [Cryptowatch](https://cryptowat.ch) (for reference, check [their docs](https://cryptowat.ch/docs/api#ohlc))." 258 | ] 259 | }, 260 | { 261 | "cell_type": "code", 262 | "execution_count": null, 263 | "metadata": {}, 264 | "outputs": [], 265 | "source": [ 266 | "def get_historic_price(symbol, exchange='bitfinex', after='2018-09-01'):\n", 267 | " url = 'https://api.cryptowat.ch/markets/{exchange}/{symbol}usd/ohlc'.format(\n", 268 | " symbol=symbol, exchange=exchange)\n", 269 | " resp = requests.get(url, params={\n", 270 | " 'periods': '3600',\n", 271 | " 'after': str(int(pd.Timestamp(after).timestamp()))\n", 272 | " })\n", 273 | " resp.raise_for_status()\n", 274 | " data = resp.json()\n", 275 | " df = pd.DataFrame(data['result']['3600'], columns=[\n", 276 | " 'CloseTime', 'OpenPrice', 'HighPrice', 'LowPrice', 'ClosePrice', 'Volume', 'NA'\n", 277 | " ])\n", 278 | " df['CloseTime'] = pd.to_datetime(df['CloseTime'], unit='s')\n", 279 | " df.set_index('CloseTime', inplace=True)\n", 280 | " return df" 281 | ] 282 | }, 283 | { 284 | "cell_type": "markdown", 285 | "metadata": {}, 286 | "source": [ 287 | "I will now pull data from Bitcoin and Ether, two of the most popular cryptocurrencies, for the last 7 days:" 288 | ] 289 | }, 290 | { 291 | "cell_type": "code", 292 | "execution_count": null, 293 | "metadata": {}, 294 | "outputs": [], 295 | "source": [ 296 | "last_week = (pd.Timestamp.now() - pd.offsets.Day(7))\n", 297 | "last_week" 298 | ] 299 | }, 300 | { 301 | "cell_type": "code", 302 | "execution_count": null, 303 | "metadata": {}, 304 | "outputs": [], 305 | "source": [ 306 | "btc = get_historic_price('btc', 'bitstamp', after=last_week)" 307 | ] 308 | }, 309 | { 310 | "cell_type": "code", 311 | "execution_count": null, 312 | "metadata": {}, 313 | "outputs": [], 314 | "source": [ 315 | "eth = get_historic_price('eth', 'bitstamp', after=last_week)" 316 | ] 317 | }, 318 | { 319 | "cell_type": "markdown", 320 | "metadata": {}, 321 | "source": [ 322 | "**Bitcoin:**" 323 | ] 324 | }, 325 | { 326 | "cell_type": "code", 327 | "execution_count": null, 328 | "metadata": {}, 329 | "outputs": [], 330 | "source": [ 331 | "btc.head()" 332 | ] 333 | }, 334 | { 335 | "cell_type": "code", 336 | "execution_count": null, 337 | "metadata": {}, 338 | "outputs": [], 339 | "source": [ 340 | "btc['ClosePrice'].plot(figsize=(15, 7))" 341 | ] 342 | }, 343 | { 344 | "cell_type": "markdown", 345 | "metadata": {}, 346 | "source": [ 347 | "**Ether:**" 348 | ] 349 | }, 350 | { 351 | "cell_type": "code", 352 | "execution_count": null, 353 | "metadata": {}, 354 | "outputs": [], 355 | "source": [ 356 | "eth.head()" 357 | ] 358 | }, 359 | { 360 | "cell_type": "code", 361 | "execution_count": null, 362 | "metadata": {}, 363 | "outputs": [], 364 | "source": [ 365 | "eth['ClosePrice'].plot(figsize=(15, 7))" 366 | ] 367 | }, 368 | { 369 | "cell_type": "markdown", 370 | "metadata": {}, 371 | "source": [ 372 | "As you can see, we're able to pull data from the internet with just a few lines, create a DataFrame and plot it all within Jupyter Lab." 373 | ] 374 | }, 375 | { 376 | "cell_type": "code", 377 | "execution_count": null, 378 | "metadata": {}, 379 | "outputs": [], 380 | "source": [ 381 | "eth.head()" 382 | ] 383 | }, 384 | { 385 | "cell_type": "markdown", 386 | "metadata": {}, 387 | "source": [ 388 | "![green-divider](https://user-images.githubusercontent.com/7065401/52071924-c003ad80-2562-11e9-8297-1c6595f8a7ff.png)\n", 389 | "\n", 390 | "### Bonus: Dynamic plots with Bokeh\n", 391 | "\n", 392 | "We've also included [Bokeh](https://bokeh.pydata.org/) as part of this main distribution. Bokeh is a plotting library that generates interactive plots, that can be manipulated right within your browser.\n", 393 | "\n", 394 | "We first need to import the libraries:" 395 | ] 396 | }, 397 | { 398 | "cell_type": "code", 399 | "execution_count": null, 400 | "metadata": {}, 401 | "outputs": [], 402 | "source": [ 403 | "from bokeh.plotting import figure, output_file, show\n", 404 | "from bokeh.io import output_notebook" 405 | ] 406 | }, 407 | { 408 | "cell_type": "code", 409 | "execution_count": null, 410 | "metadata": {}, 411 | "outputs": [], 412 | "source": [ 413 | "output_notebook()" 414 | ] 415 | }, 416 | { 417 | "cell_type": "markdown", 418 | "metadata": {}, 419 | "source": [ 420 | "And we generate the plot:" 421 | ] 422 | }, 423 | { 424 | "cell_type": "code", 425 | "execution_count": null, 426 | "metadata": {}, 427 | "outputs": [], 428 | "source": [ 429 | "p1 = figure(x_axis_type=\"datetime\", title=\"Crypto Prices\", width=800)\n", 430 | "p1.grid.grid_line_alpha=0.3\n", 431 | "p1.xaxis.axis_label = 'Date'\n", 432 | "p1.yaxis.axis_label = 'Price'\n", 433 | "\n", 434 | "p1.line(btc.index, btc['ClosePrice'], color='#f2a900', legend='Bitcoin')\n", 435 | "#p1.line(eth.index, eth['ClosePrice'], color='#A6CEE3', legend='Ether')\n", 436 | "\n", 437 | "p1.legend.location = \"top_left\"\n", 438 | "\n", 439 | "show(p1)" 440 | ] 441 | }, 442 | { 443 | "cell_type": "markdown", 444 | "metadata": {}, 445 | "source": [ 446 | "☝️ as you can see, the plot is interactive. Try zomming in and out, and scrolling in the plot." 447 | ] 448 | }, 449 | { 450 | "cell_type": "markdown", 451 | "metadata": {}, 452 | "source": [ 453 | "![green-divider](https://user-images.githubusercontent.com/7065401/52071924-c003ad80-2562-11e9-8297-1c6595f8a7ff.png)\n", 454 | "\n", 455 | "## Part 4: Exporting to Excel\n", 456 | "\n", 457 | "We're now ready to generate an Excel file from the downloaded prices. Working with Excel and other formats (like CSV or JSON) is extremely simple in Jupyter Lab (thanks to pandas and Python). Our first step will be to create an \"Excel writer\", a component from the `pandas` package:" 458 | ] 459 | }, 460 | { 461 | "cell_type": "code", 462 | "execution_count": null, 463 | "metadata": {}, 464 | "outputs": [], 465 | "source": [ 466 | "writer = pd.ExcelWriter('cryptos.xlsx')" 467 | ] 468 | }, 469 | { 470 | "cell_type": "markdown", 471 | "metadata": {}, 472 | "source": [ 473 | "We'll now write both our Bitcoin and Ether data as separate sheets:" 474 | ] 475 | }, 476 | { 477 | "cell_type": "code", 478 | "execution_count": null, 479 | "metadata": {}, 480 | "outputs": [], 481 | "source": [ 482 | "btc.to_excel(writer, sheet_name='Bitcoin')" 483 | ] 484 | }, 485 | { 486 | "cell_type": "code", 487 | "execution_count": null, 488 | "metadata": {}, 489 | "outputs": [], 490 | "source": [ 491 | "eth.to_excel(writer, sheet_name='Ether')" 492 | ] 493 | }, 494 | { 495 | "cell_type": "markdown", 496 | "metadata": {}, 497 | "source": [ 498 | "And finally, we can save the file:" 499 | ] 500 | }, 501 | { 502 | "cell_type": "code", 503 | "execution_count": null, 504 | "metadata": {}, 505 | "outputs": [], 506 | "source": [ 507 | "writer.save()" 508 | ] 509 | }, 510 | { 511 | "cell_type": "markdown", 512 | "metadata": {}, 513 | "source": [ 514 | "Once you've saved the file, you should see it in the left side navigation bar:\n", 515 | "\n", 516 | "![Excel file](images/_5.png)" 517 | ] 518 | }, 519 | { 520 | "cell_type": "markdown", 521 | "metadata": {}, 522 | "source": [ 523 | "## Final words and how to get help\n", 524 | "\n", 525 | "That's it! It's your time now to start working and playing around with jupyter lab and Notebooks.ai. This product is in an early stage, so we'd love to receive all your feedback and suggestions. If you need help or ideas for us to implement, create an issue in the following replo: [https://github.com/notebooks-ai/notebooks-help](https://github.com/notebooks-ai/notebooks-help). It'll be highly appreciated!" 526 | ] 527 | }, 528 | { 529 | "cell_type": "markdown", 530 | "metadata": {}, 531 | "source": [ 532 | "![purple-divider](https://user-images.githubusercontent.com/7065401/52071927-c1cd7100-2562-11e9-908a-dde91ba14e59.png)" 533 | ] 534 | } 535 | ], 536 | "metadata": { 537 | "kernelspec": { 538 | "display_name": "Python 3", 539 | "language": "python", 540 | "name": "python3" 541 | }, 542 | "language_info": { 543 | "codemirror_mode": { 544 | "name": "ipython", 545 | "version": 3 546 | }, 547 | "file_extension": ".py", 548 | "mimetype": "text/x-python", 549 | "name": "python", 550 | "nbconvert_exporter": "python", 551 | "pygments_lexer": "ipython3", 552 | "version": "3.6.8" 553 | } 554 | }, 555 | "nbformat": 4, 556 | "nbformat_minor": 2 557 | } 558 | -------------------------------------------------------------------------------- /cryptos.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial/784e45031719aa045b91af9acd4ae357d34283bc/cryptos.xlsx -------------------------------------------------------------------------------- /images/_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial/784e45031719aa045b91af9acd4ae357d34283bc/images/_1.png -------------------------------------------------------------------------------- /images/_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial/784e45031719aa045b91af9acd4ae357d34283bc/images/_2.png -------------------------------------------------------------------------------- /images/_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial/784e45031719aa045b91af9acd4ae357d34283bc/images/_3.gif -------------------------------------------------------------------------------- /images/_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial/784e45031719aa045b91af9acd4ae357d34283bc/images/_4.gif -------------------------------------------------------------------------------- /images/_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial/784e45031719aa045b91af9acd4ae357d34283bc/images/_5.png -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial/784e45031719aa045b91af9acd4ae357d34283bc/utils.py --------------------------------------------------------------------------------