{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "a6546f40-df41-40fc-acaa-374bc74cbe92", "metadata": {}, "outputs": [], "source": [ "# Import packages\n", "import plotly.graph_objects as go\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "id": "74f8ca92-1149-4e72-8bc7-672bb7d5b82e", "metadata": {}, "outputs": [], "source": [ "# Read in the data\n", "data = pd.read_csv(\"../coal-price-data/AirPassengers.csv\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "1616a67a-f0f7-4733-b3b2-f88cdd6b6a9f", "metadata": {}, "outputs": [], "source": [ "data[\"Month\"] = pd.to_datetime(data[\"Month\"])" ] }, { "cell_type": "code", "execution_count": 4, "id": "1c798b99-fde4-46a8-9a89-1314db25f1b0", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Month | \n", "#Passengers | \n", "
---|---|---|
0 | \n", "1949-01-01 | \n", "112 | \n", "
1 | \n", "1949-02-01 | \n", "118 | \n", "
2 | \n", "1949-03-01 | \n", "132 | \n", "
3 | \n", "1949-04-01 | \n", "129 | \n", "
4 | \n", "1949-05-01 | \n", "121 | \n", "
... | \n", "... | \n", "... | \n", "
139 | \n", "1960-08-01 | \n", "606 | \n", "
140 | \n", "1960-09-01 | \n", "508 | \n", "
141 | \n", "1960-10-01 | \n", "461 | \n", "
142 | \n", "1960-11-01 | \n", "390 | \n", "
143 | \n", "1960-12-01 | \n", "432 | \n", "
144 rows × 2 columns
\n", "\n", " | Month | \n", "#Passengers | \n", "
---|---|---|
116 | \n", "1958-09-01 | \n", "404 | \n", "
117 | \n", "1958-10-01 | \n", "359 | \n", "
118 | \n", "1958-11-01 | \n", "310 | \n", "
119 | \n", "1958-12-01 | \n", "337 | \n", "
120 | \n", "1959-01-01 | \n", "360 | \n", "
121 | \n", "1959-02-01 | \n", "342 | \n", "
122 | \n", "1959-03-01 | \n", "406 | \n", "
123 | \n", "1959-04-01 | \n", "396 | \n", "
124 | \n", "1959-05-01 | \n", "420 | \n", "
125 | \n", "1959-06-01 | \n", "472 | \n", "
126 | \n", "1959-07-01 | \n", "548 | \n", "
127 | \n", "1959-08-01 | \n", "559 | \n", "
128 | \n", "1959-09-01 | \n", "463 | \n", "
129 | \n", "1959-10-01 | \n", "407 | \n", "
130 | \n", "1959-11-01 | \n", "362 | \n", "
131 | \n", "1959-12-01 | \n", "405 | \n", "
132 | \n", "1960-01-01 | \n", "417 | \n", "
133 | \n", "1960-02-01 | \n", "391 | \n", "
134 | \n", "1960-03-01 | \n", "419 | \n", "
135 | \n", "1960-04-01 | \n", "461 | \n", "
136 | \n", "1960-05-01 | \n", "472 | \n", "
137 | \n", "1960-06-01 | \n", "535 | \n", "
138 | \n", "1960-07-01 | \n", "622 | \n", "
139 | \n", "1960-08-01 | \n", "606 | \n", "
140 | \n", "1960-09-01 | \n", "508 | \n", "
141 | \n", "1960-10-01 | \n", "461 | \n", "
142 | \n", "1960-11-01 | \n", "390 | \n", "
143 | \n", "1960-12-01 | \n", "432 | \n", "