Created
January 2, 2024 19:03
-
-
Save iangow/b64c6e31309939794d9bbb31b8851b20 to your computer and use it in GitHub Desktop.
Tidy Data Manipulation: dplyr vs polars using Ibis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "1e875879-596a-4799-ab38-c1d1c6095937", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from palmerpenguins import load_penguins" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "2ae9b4de-eceb-4773-a054-814654d5f3ac", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import ibis\n", | |
"from ibis import _\n", | |
"ibis.options.interactive = True" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "a001cb56-8c7e-4231-8da4-25f4971ec8ad", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"con = ibis.polars.connect()\n", | |
"penguins = con.read_pandas(load_penguins())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"id": "fbfcdf9c-3696-4d45-9e45-10903c8dbcf9", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# con = ibis.duckdb.connect()\n", | |
"# penguins = con.read_in_memory(load_penguins())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"id": "f5c1e4d4-7989-4234-a2ab-65ed2e25d938", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# con = ibis.pandas.connect()\n", | |
"# penguins = con.from_dataframe(load_penguins())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"id": "8b5fa976-ea56-4c40-a2ce-6b2a9e95d3c0", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββ³ββββββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β<span style=\"font-weight: bold\"> species </span>β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> bill_length_mm </span>β<span style=\"font-weight: bold\"> bill_depth_mm </span>β<span style=\"font-weight: bold\"> flipper_length_mm </span>β<span style=\"font-weight: bold\"> body_mass_g </span>β<span style=\"font-weight: bold\"> sex </span>β<span style=\"font-weight: bold\"> year </span>β\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">int64</span> β\n", | |
"βββββββββββΌββββββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3750.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.5</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.4</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">186.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3800.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">40.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3250.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">36.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3450.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3650.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">38.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.8</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3625.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4675.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">34.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3475.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">42.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4250.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β\n", | |
"βββββββββββ΄ββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββ³ββββββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1mspecies\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mflipper_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbody_mass_g\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1msex\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1myear\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mint64\u001b[0m β\n", | |
"βββββββββββΌββββββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.1\u001b[0m β \u001b[1;36m18.7\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3750.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.5\u001b[0m β \u001b[1;36m17.4\u001b[0m β \u001b[1;36m186.0\u001b[0m β \u001b[1;36m3800.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m40.3\u001b[0m β \u001b[1;36m18.0\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m3250.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m36.7\u001b[0m β \u001b[1;36m19.3\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3450.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.3\u001b[0m β \u001b[1;36m20.6\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m3650.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m38.9\u001b[0m β \u001b[1;36m17.8\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3625.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.2\u001b[0m β \u001b[1;36m19.6\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m4675.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m34.1\u001b[0m β \u001b[1;36m18.1\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3475.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m42.0\u001b[0m β \u001b[1;36m20.2\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m4250.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β\n", | |
"βββββββββββ΄ββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"penguins" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"id": "e5b6f73e-a03c-41ee-b285-535ecfdf64f9", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββ³βββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β<span style=\"font-weight: bold\"> species </span>β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> bill_length_mm </span>β<span style=\"font-weight: bold\"> bill_depth_mm </span>β<span style=\"font-weight: bold\"> flipper_length_mm </span>β<span style=\"font-weight: bold\"> body_mass_g </span>β<span style=\"font-weight: bold\"> sex </span>β<span style=\"font-weight: bold\"> year </span>β\n", | |
"β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">int64</span> β\n", | |
"βββββββββββΌβββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">37.8</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">174.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3400.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">37.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">180.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3600.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">35.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">189.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3800.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">38.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">185.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3950.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">38.8</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">180.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3800.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">35.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">187.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3800.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">40.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">183.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3550.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">40.5</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">187.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3200.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">37.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">172.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3150.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">40.5</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">180.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3950.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β\n", | |
"βββββββββββ΄βββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββ³βββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1mspecies\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mflipper_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbody_mass_g\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1msex\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1myear\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mint64\u001b[0m β\n", | |
"βββββββββββΌβββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m37.8\u001b[0m β \u001b[1;36m18.3\u001b[0m β \u001b[1;36m174.0\u001b[0m β \u001b[1;36m3400.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m37.7\u001b[0m β \u001b[1;36m18.7\u001b[0m β \u001b[1;36m180.0\u001b[0m β \u001b[1;36m3600.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m35.9\u001b[0m β \u001b[1;36m19.2\u001b[0m β \u001b[1;36m189.0\u001b[0m β \u001b[1;36m3800.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m38.2\u001b[0m β \u001b[1;36m18.1\u001b[0m β \u001b[1;36m185.0\u001b[0m β \u001b[1;36m3950.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m38.8\u001b[0m β \u001b[1;36m17.2\u001b[0m β \u001b[1;36m180.0\u001b[0m β \u001b[1;36m3800.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m35.3\u001b[0m β \u001b[1;36m18.9\u001b[0m β \u001b[1;36m187.0\u001b[0m β \u001b[1;36m3800.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m40.6\u001b[0m β \u001b[1;36m18.6\u001b[0m β \u001b[1;36m183.0\u001b[0m β \u001b[1;36m3550.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m40.5\u001b[0m β \u001b[1;36m17.9\u001b[0m β \u001b[1;36m187.0\u001b[0m β \u001b[1;36m3200.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m37.9\u001b[0m β \u001b[1;36m18.6\u001b[0m β \u001b[1;36m172.0\u001b[0m β \u001b[1;36m3150.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m40.5\u001b[0m β \u001b[1;36m18.9\u001b[0m β \u001b[1;36m180.0\u001b[0m β \u001b[1;36m3950.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β\n", | |
"βββββββββββ΄βββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins\n", | |
" .filter(\n", | |
" [_.species == \"Adelie\",\n", | |
" _.island.isin([\"Biscoe\", \"Dream\"])])\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"id": "3d3c6371-b603-4d07-b6b5-ac91b77b8e91", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>species</th>\n", | |
" <th>island</th>\n", | |
" <th>bill_length_mm</th>\n", | |
" <th>bill_depth_mm</th>\n", | |
" <th>flipper_length_mm</th>\n", | |
" <th>body_mass_g</th>\n", | |
" <th>sex</th>\n", | |
" <th>year</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>42.0</td>\n", | |
" <td>20.2</td>\n", | |
" <td>190.0</td>\n", | |
" <td>4250.0</td>\n", | |
" <td>None</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>37.8</td>\n", | |
" <td>17.1</td>\n", | |
" <td>186.0</td>\n", | |
" <td>3300.0</td>\n", | |
" <td>None</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>37.8</td>\n", | |
" <td>17.3</td>\n", | |
" <td>180.0</td>\n", | |
" <td>3700.0</td>\n", | |
" <td>None</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>41.1</td>\n", | |
" <td>17.6</td>\n", | |
" <td>182.0</td>\n", | |
" <td>3200.0</td>\n", | |
" <td>female</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>38.6</td>\n", | |
" <td>21.2</td>\n", | |
" <td>191.0</td>\n", | |
" <td>3800.0</td>\n", | |
" <td>male</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>34.6</td>\n", | |
" <td>21.1</td>\n", | |
" <td>198.0</td>\n", | |
" <td>4400.0</td>\n", | |
" <td>male</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>36.6</td>\n", | |
" <td>17.8</td>\n", | |
" <td>185.0</td>\n", | |
" <td>3700.0</td>\n", | |
" <td>female</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>38.7</td>\n", | |
" <td>19.0</td>\n", | |
" <td>195.0</td>\n", | |
" <td>3450.0</td>\n", | |
" <td>female</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>42.5</td>\n", | |
" <td>20.7</td>\n", | |
" <td>197.0</td>\n", | |
" <td>4500.0</td>\n", | |
" <td>male</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>34.4</td>\n", | |
" <td>18.4</td>\n", | |
" <td>184.0</td>\n", | |
" <td>3325.0</td>\n", | |
" <td>female</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>Adelie</td>\n", | |
" <td>Torgersen</td>\n", | |
" <td>46.0</td>\n", | |
" <td>21.5</td>\n", | |
" <td>194.0</td>\n", | |
" <td>4200.0</td>\n", | |
" <td>male</td>\n", | |
" <td>2007</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" species island bill_length_mm bill_depth_mm flipper_length_mm \\\n", | |
"0 Adelie Torgersen 42.0 20.2 190.0 \n", | |
"1 Adelie Torgersen 37.8 17.1 186.0 \n", | |
"2 Adelie Torgersen 37.8 17.3 180.0 \n", | |
"3 Adelie Torgersen 41.1 17.6 182.0 \n", | |
"4 Adelie Torgersen 38.6 21.2 191.0 \n", | |
"5 Adelie Torgersen 34.6 21.1 198.0 \n", | |
"6 Adelie Torgersen 36.6 17.8 185.0 \n", | |
"7 Adelie Torgersen 38.7 19.0 195.0 \n", | |
"8 Adelie Torgersen 42.5 20.7 197.0 \n", | |
"9 Adelie Torgersen 34.4 18.4 184.0 \n", | |
"10 Adelie Torgersen 46.0 21.5 194.0 \n", | |
"\n", | |
" body_mass_g sex year \n", | |
"0 4250.0 None 2007 \n", | |
"1 3300.0 None 2007 \n", | |
"2 3700.0 None 2007 \n", | |
"3 3200.0 female 2007 \n", | |
"4 3800.0 male 2007 \n", | |
"5 4400.0 male 2007 \n", | |
"6 3700.0 female 2007 \n", | |
"7 3450.0 female 2007 \n", | |
"8 4500.0 male 2007 \n", | |
"9 3325.0 female 2007 \n", | |
"10 4200.0 male 2007 " | |
] | |
}, | |
"execution_count": 8, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"penguins.limit(11, offset=9).to_pandas()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"id": "04724a65-05f0-4650-8f19-fb9f378b47e2", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββ³βββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β<span style=\"font-weight: bold\"> species </span>β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> bill_length_mm </span>β<span style=\"font-weight: bold\"> bill_depth_mm </span>β<span style=\"font-weight: bold\"> flipper_length_mm </span>β<span style=\"font-weight: bold\"> body_mass_g </span>β<span style=\"font-weight: bold\"> sex </span>β<span style=\"font-weight: bold\"> year </span>β\n", | |
"β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">int64</span> β\n", | |
"βββββββββββΌβββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">59.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">230.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">6050.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">55.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">228.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5600.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">55.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">16.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">230.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5850.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">54.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">231.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5650.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2008</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">53.4</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.8</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">219.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5500.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">52.5</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">221.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5450.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">52.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">228.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5400.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">52.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">230.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5550.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Gentoo </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">51.5</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">16.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">230.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5500.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2009</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β\n", | |
"βββββββββββ΄βββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββ³βββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1mspecies\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mflipper_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbody_mass_g\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1msex\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1myear\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mint64\u001b[0m β\n", | |
"βββββββββββΌβββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m59.6\u001b[0m β \u001b[1;36m17.0\u001b[0m β \u001b[1;36m230.0\u001b[0m β \u001b[1;36m6050.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m55.9\u001b[0m β \u001b[1;36m17.0\u001b[0m β \u001b[1;36m228.0\u001b[0m β \u001b[1;36m5600.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m55.1\u001b[0m β \u001b[1;36m16.0\u001b[0m β \u001b[1;36m230.0\u001b[0m β \u001b[1;36m5850.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m54.3\u001b[0m β \u001b[1;36m15.7\u001b[0m β \u001b[1;36m231.0\u001b[0m β \u001b[1;36m5650.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2008\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m53.4\u001b[0m β \u001b[1;36m15.8\u001b[0m β \u001b[1;36m219.0\u001b[0m β \u001b[1;36m5500.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m52.5\u001b[0m β \u001b[1;36m15.6\u001b[0m β \u001b[1;36m221.0\u001b[0m β \u001b[1;36m5450.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m52.2\u001b[0m β \u001b[1;36m17.1\u001b[0m β \u001b[1;36m228.0\u001b[0m β \u001b[1;36m5400.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m52.1\u001b[0m β \u001b[1;36m17.0\u001b[0m β \u001b[1;36m230.0\u001b[0m β \u001b[1;36m5550.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[32mGentoo \u001b[0m β \u001b[32mBiscoe\u001b[0m β \u001b[1;36m51.5\u001b[0m β \u001b[1;36m16.3\u001b[0m β \u001b[1;36m230.0\u001b[0m β \u001b[1;36m5500.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2009\u001b[0m β\n", | |
"β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β\n", | |
"βββββββββββ΄βββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins.\n", | |
" order_by([_.island, _.bill_length_mm.desc()]))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"id": "565afacb-2a47-43da-a2f1-edc8afc87807", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">ββββββββββββββββββ³βββββββββ\n", | |
"β<span style=\"font-weight: bold\"> bill_length_mm </span>β<span style=\"font-weight: bold\"> sex </span>β\n", | |
"β‘ββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β\n", | |
"ββββββββββββββββββΌβββββββββ€\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.1</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.5</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">40.3</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">36.7</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.3</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">38.9</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.2</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">34.1</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β\n", | |
"β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">42.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β\n", | |
"ββββββββββββββββββ΄βββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"ββββββββββββββββββ³βββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1mbill_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1msex\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘ββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mfloat64\u001b[0m β \u001b[2mstring\u001b[0m β\n", | |
"ββββββββββββββββββΌβββββββββ€\n", | |
"β \u001b[1;36m39.1\u001b[0m β \u001b[32mmale \u001b[0m β\n", | |
"β \u001b[1;36m39.5\u001b[0m β \u001b[32mfemale\u001b[0m β\n", | |
"β \u001b[1;36m40.3\u001b[0m β \u001b[32mfemale\u001b[0m β\n", | |
"β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β\n", | |
"β \u001b[1;36m36.7\u001b[0m β \u001b[32mfemale\u001b[0m β\n", | |
"β \u001b[1;36m39.3\u001b[0m β \u001b[32mmale \u001b[0m β\n", | |
"β \u001b[1;36m38.9\u001b[0m β \u001b[32mfemale\u001b[0m β\n", | |
"β \u001b[1;36m39.2\u001b[0m β \u001b[32mmale \u001b[0m β\n", | |
"β \u001b[1;36m34.1\u001b[0m β \u001b[2mNULL\u001b[0m β\n", | |
"β \u001b[1;36m42.0\u001b[0m β \u001b[2mNULL\u001b[0m β\n", | |
"β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β\n", | |
"ββββββββββββββββββ΄βββββββββ" | |
] | |
}, | |
"execution_count": 10, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins.\n", | |
" select(\"bill_length_mm\", \"sex\"))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"id": "62e5129b-c737-4b5e-ae9c-7beb3e5d0ecc", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββ³ββββββββββββ³ββββββββββββββ³βββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β<span style=\"font-weight: bold\"> species </span>β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> bill_length </span>β<span style=\"font-weight: bold\"> bill_depth </span>β<span style=\"font-weight: bold\"> flipper_length_mm </span>β<span style=\"font-weight: bold\"> body_mass_g </span>β<span style=\"font-weight: bold\"> sex </span>β<span style=\"font-weight: bold\"> year </span>β\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">int64</span> β\n", | |
"βββββββββββΌββββββββββββΌββββββββββββββΌβββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3750.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.5</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.4</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">186.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3800.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">40.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3250.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">36.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3450.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3650.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">38.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.8</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3625.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4675.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">34.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3475.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">42.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4250.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β\n", | |
"βββββββββββ΄ββββββββββββ΄ββββββββββββββ΄βββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββ³ββββββββββββ³ββββββββββββββ³βββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1mspecies\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_length\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mflipper_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbody_mass_g\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1msex\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1myear\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mint64\u001b[0m β\n", | |
"βββββββββββΌββββββββββββΌββββββββββββββΌβββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββ€\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.1\u001b[0m β \u001b[1;36m18.7\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3750.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.5\u001b[0m β \u001b[1;36m17.4\u001b[0m β \u001b[1;36m186.0\u001b[0m β \u001b[1;36m3800.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m40.3\u001b[0m β \u001b[1;36m18.0\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m3250.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m36.7\u001b[0m β \u001b[1;36m19.3\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3450.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.3\u001b[0m β \u001b[1;36m20.6\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m3650.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m38.9\u001b[0m β \u001b[1;36m17.8\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3625.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m39.2\u001b[0m β \u001b[1;36m19.6\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m4675.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m34.1\u001b[0m β \u001b[1;36m18.1\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3475.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m42.0\u001b[0m β \u001b[1;36m20.2\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m4250.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β\n", | |
"βββββββββββ΄ββββββββββββ΄ββββββββββββββ΄βββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins \n", | |
" .rename(bill_length = \"bill_length_mm\",\n", | |
" bill_depth = \"bill_depth_mm\"))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"id": "52e63d20-51a5-4be9-8441-00f2b709f76a", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββ³ββββββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ³ββββββββββββββββββββββ\n", | |
"β<span style=\"font-weight: bold\"> species </span>β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> bill_length_mm </span>β<span style=\"font-weight: bold\"> bill_depth_mm </span>β<span style=\"font-weight: bold\"> flipper_length_mm </span>β<span style=\"font-weight: bold\"> body_mass_g </span>β<span style=\"font-weight: bold\"> sex </span>β<span style=\"font-weight: bold\"> year </span>β<span style=\"font-weight: bold\"> bill_length_squared </span>β\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">int64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β\n", | |
"βββββββββββΌββββββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββΌββββββββββββββββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3.91</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3750.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.2881</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3.95</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.4</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">186.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3800.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.6025</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4.03</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3250.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">16.2409</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3.67</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3450.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">13.4689</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3.93</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3650.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.4449</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3.89</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.8</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3625.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.1321</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3.92</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4675.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.3664</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3.41</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3475.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">11.6281</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4.20</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4250.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.6400</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β\n", | |
"βββββββββββ΄ββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ΄ββββββββββββββββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββ³ββββββββββββ³βββββββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββ³ββββββββββββββββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1mspecies\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mflipper_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbody_mass_g\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1msex\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1myear\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_length_squared\u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mint64\u001b[0m β \u001b[2mfloat64\u001b[0m β\n", | |
"βββββββββββΌββββββββββββΌβββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββΌββββββββββββββββββββββ€\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m3.91\u001b[0m β \u001b[1;36m18.7\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3750.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m15.2881\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m3.95\u001b[0m β \u001b[1;36m17.4\u001b[0m β \u001b[1;36m186.0\u001b[0m β \u001b[1;36m3800.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m15.6025\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m4.03\u001b[0m β \u001b[1;36m18.0\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m3250.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m16.2409\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[2mNULL\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m3.67\u001b[0m β \u001b[1;36m19.3\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3450.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m13.4689\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m3.93\u001b[0m β \u001b[1;36m20.6\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m3650.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m15.4449\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m3.89\u001b[0m β \u001b[1;36m17.8\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3625.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m15.1321\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m3.92\u001b[0m β \u001b[1;36m19.6\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m4675.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m15.3664\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m3.41\u001b[0m β \u001b[1;36m18.1\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3475.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m11.6281\u001b[0m β\n", | |
"β \u001b[32mAdelie \u001b[0m β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m4.20\u001b[0m β \u001b[1;36m20.2\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m4250.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β \u001b[1;36m17.6400\u001b[0m β\n", | |
"β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β\n", | |
"βββββββββββ΄ββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββ΄ββββββββββββββββββββββ" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins\n", | |
" .mutate(bill_length_mm = _.bill_length_mm / 10)\n", | |
" .mutate(bill_length_squared = _.bill_length_mm **2))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"id": "19bf5d9a-8c5d-4a83-8849-99859286decb", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββββ³βββββββββββββββββ³ββββββββ\n", | |
"β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> bill_depth_mm </span>β<span style=\"font-weight: bold\"> flipper_length_mm </span>β<span style=\"font-weight: bold\"> body_mass_g </span>β<span style=\"font-weight: bold\"> sex </span>β<span style=\"font-weight: bold\"> species </span>β<span style=\"font-weight: bold\"> bill_length_mm </span>β<span style=\"font-weight: bold\"> year </span>β\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">int64</span> β\n", | |
"βββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββββΌβββββββββββββββββΌββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3750.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.4</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">186.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3800.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.5</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3250.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">40.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3450.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">36.7</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3650.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.3</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">17.8</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">181.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3625.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">female</span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">38.9</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19.6</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">195.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4675.0</span> β <span style=\"color: #008000; text-decoration-color: #008000\">male </span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">39.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3475.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">34.1</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20.2</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">190.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4250.0</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">NULL</span> β <span style=\"color: #008000; text-decoration-color: #008000\">Adelie </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">42.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2007</span> β\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">β¦</span> β\n", | |
"βββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββββ΄βββββββββββββββββ΄ββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββββ³ββββββββββββββββ³ββββββββββββββββββββ³ββββββββββββββ³βββββββββ³ββββββββββ³βββββββββββββββββ³ββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mflipper_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbody_mass_g\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1msex\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mspecies\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_length_mm\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1myear\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mint64\u001b[0m β\n", | |
"βββββββββββββΌββββββββββββββββΌββββββββββββββββββββΌββββββββββββββΌβββββββββΌββββββββββΌβββββββββββββββββΌββββββββ€\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m18.7\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3750.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m39.1\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m17.4\u001b[0m β \u001b[1;36m186.0\u001b[0m β \u001b[1;36m3800.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m39.5\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m18.0\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m3250.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m40.3\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m19.3\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3450.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m36.7\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m20.6\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m3650.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m39.3\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m17.8\u001b[0m β \u001b[1;36m181.0\u001b[0m β \u001b[1;36m3625.0\u001b[0m β \u001b[32mfemale\u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m38.9\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m19.6\u001b[0m β \u001b[1;36m195.0\u001b[0m β \u001b[1;36m4675.0\u001b[0m β \u001b[32mmale \u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m39.2\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m18.1\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m3475.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m34.1\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m20.2\u001b[0m β \u001b[1;36m190.0\u001b[0m β \u001b[1;36m4250.0\u001b[0m β \u001b[2mNULL\u001b[0m β \u001b[32mAdelie \u001b[0m β \u001b[1;36m42.0\u001b[0m β \u001b[1;36m2007\u001b[0m β\n", | |
"β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β \u001b[2mβ¦\u001b[0m β\n", | |
"βββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββ΄βββββββββ΄ββββββββββ΄βββββββββββββββββ΄ββββββββ" | |
] | |
}, | |
"execution_count": 13, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins\n", | |
" .select(\"island\", \"bill_depth_mm\", \"flipper_length_mm\", \n", | |
" \"body_mass_g\", \"sex\", \"species\",\n", | |
" \"bill_length_mm\", \"year\"))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"id": "a2745bd9-14f4-4f1d-8236-dc261e9bada7", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββββ³ββββββββββββββββββ\n", | |
"β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> bill_depth_mean </span>β\n", | |
"β‘ββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β\n", | |
"βββββββββββββΌββββββββββββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.429412</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.874850</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Dream </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.344355</span> β\n", | |
"βββββββββββββ΄ββββββββββββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββββ³ββββββββββββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth_mean\u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘ββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mfloat64\u001b[0m β\n", | |
"βββββββββββββΌββββββββββββββββββ€\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m18.429412\u001b[0m β\n", | |
"β \u001b[32mBiscoe \u001b[0m β \u001b[1;36m15.874850\u001b[0m β\n", | |
"β \u001b[32mDream \u001b[0m β \u001b[1;36m18.344355\u001b[0m β\n", | |
"βββββββββββββ΄ββββββββββββββββββ" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins \n", | |
" .group_by(\"island\")\n", | |
" .aggregate(bill_depth_mean = _.bill_depth_mm.mean()))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"id": "5a374995-9316-411e-886b-00908f1ef593", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">βββββββββββββ³ββββββββ³ββββββββββββββββββ³ββββββββββββββββββββββββ³βββββββββββββββ³βββββββββββββββ\n", | |
"β<span style=\"font-weight: bold\"> island </span>β<span style=\"font-weight: bold\"> count </span>β<span style=\"font-weight: bold\"> bill_depth_mean </span>β<span style=\"font-weight: bold\"> flipper_length_median </span>β<span style=\"font-weight: bold\"> body_mass_sd </span>β<span style=\"font-weight: bold\"> share_female </span>β\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">string</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">int64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">float64</span> β\n", | |
"βββββββββββββΌββββββββΌββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββΌβββββββββββββββ€\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Biscoe </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">168</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">15.874850</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">214.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">782.855743</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.490798</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Dream </span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">124</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.344355</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">193.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">416.644112</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.495935</span> β\n", | |
"β <span style=\"color: #008000; text-decoration-color: #008000\">Torgersen</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">52</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">18.429412</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">191.0</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">445.107940</span> β <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.510638</span> β\n", | |
"βββββββββββββ΄ββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ\n", | |
"</pre>\n" | |
], | |
"text/plain": [ | |
"βββββββββββββ³ββββββββ³ββββββββββββββββββ³ββββββββββββββββββββββββ³βββββββββββββββ³βββββββββββββββ\n", | |
"β\u001b[1m \u001b[0m\u001b[1misland\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mcount\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbill_depth_mean\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mflipper_length_median\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mbody_mass_sd\u001b[0m\u001b[1m \u001b[0mβ\u001b[1m \u001b[0m\u001b[1mshare_female\u001b[0m\u001b[1m \u001b[0mβ\n", | |
"β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©\n", | |
"β \u001b[2mstring\u001b[0m β \u001b[2mint64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β \u001b[2mfloat64\u001b[0m β\n", | |
"βββββββββββββΌββββββββΌββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββΌβββββββββββββββ€\n", | |
"β \u001b[32mBiscoe \u001b[0m β \u001b[1;36m168\u001b[0m β \u001b[1;36m15.874850\u001b[0m β \u001b[1;36m214.0\u001b[0m β \u001b[1;36m782.855743\u001b[0m β \u001b[1;36m0.490798\u001b[0m β\n", | |
"β \u001b[32mDream \u001b[0m β \u001b[1;36m124\u001b[0m β \u001b[1;36m18.344355\u001b[0m β \u001b[1;36m193.0\u001b[0m β \u001b[1;36m416.644112\u001b[0m β \u001b[1;36m0.495935\u001b[0m β\n", | |
"β \u001b[32mTorgersen\u001b[0m β \u001b[1;36m52\u001b[0m β \u001b[1;36m18.429412\u001b[0m β \u001b[1;36m191.0\u001b[0m β \u001b[1;36m445.107940\u001b[0m β \u001b[1;36m0.510638\u001b[0m β\n", | |
"βββββββββββββ΄ββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ" | |
] | |
}, | |
"execution_count": 15, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(penguins\n", | |
" .mutate(is_female = _.sex\n", | |
" .case()\n", | |
" .when(\"female\", 1.0)\n", | |
" .when(\"male\", 0.0)\n", | |
" .else_(ibis.NA)\n", | |
" .end())\n", | |
" .group_by(\"island\")\n", | |
" .aggregate(count = _.count(),\n", | |
" bill_depth_mean = _.bill_depth_mm.mean(),\n", | |
" flipper_length_median = _.flipper_length_mm.median(),\n", | |
" body_mass_sd = _.body_mass_g.std(),\n", | |
" share_female = _.is_female.mean())\n", | |
" .order_by(\"island\"))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "1b2a60ab-6fb0-458b-a568-47d2b7eef316", | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3 (ipykernel)", | |
"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.11.7" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment