{ "cells": [ { "cell_type": "markdown", "id": "213a38a2", "metadata": {}, "source": [ "# Polars DataFrame\n", "\n", "This notebook goes over how to load data from a [polars](https://pola-rs.github.io/polars-book/user-guide/) DataFrame." ] }, { "cell_type": "code", "execution_count": 1, "id": "f6a7a9e4-80d6-486a-b2e3-636c568aa97c", "metadata": {}, "outputs": [], "source": [ "#!pip install polars" ] }, { "cell_type": "code", "execution_count": 2, "id": "79331964", "metadata": {}, "outputs": [], "source": [ "import polars as pl" ] }, { "cell_type": "code", "execution_count": 3, "id": "e487044c", "metadata": {}, "outputs": [], "source": [ "df = pl.read_csv(\"example_data/mlb_teams_2012.csv\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "ac273ca1", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Team | "Payroll (millions)" | "Wins" |
---|---|---|
str | f64 | i64 |
"Nationals" | 81.34 | 98 |
"Reds" | 82.2 | 97 |
"Yankees" | 197.96 | 95 |
"Giants" | 117.62 | 94 |
"Braves" | 83.31 | 94 |