{ "cells": [ { "cell_type": "markdown", "id": "213a38a2", "metadata": {}, "source": [ "# Pandas DataFrame\n", "\n", "This notebook goes over how to load data from a [pandas](https://pandas.pydata.org/pandas-docs/stable/user_guide/index.html) DataFrame." ] }, { "cell_type": "code", "execution_count": null, "id": "f6a7a9e4-80d6-486a-b2e3-636c568aa97c", "metadata": {}, "outputs": [], "source": [ "#!pip install pandas" ] }, { "cell_type": "code", "execution_count": 1, "id": "79331964", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "id": "e487044c", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(\"example_data/mlb_teams_2012.csv\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "ac273ca1", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Team | \n", "\"Payroll (millions)\" | \n", "\"Wins\" | \n", "
---|---|---|---|
0 | \n", "Nationals | \n", "81.34 | \n", "98 | \n", "
1 | \n", "Reds | \n", "82.20 | \n", "97 | \n", "
2 | \n", "Yankees | \n", "197.96 | \n", "95 | \n", "
3 | \n", "Giants | \n", "117.62 | \n", "94 | \n", "
4 | \n", "Braves | \n", "83.31 | \n", "94 | \n", "