Thursday, July 7, 2022

Heatmap example flights

 boris@boris-All-Series:~/SEABORN$ cat flightHeatMap.py

import pandas as pd

import numpy as np

import seaborn as sns

import matplotlib.pyplot as plt

sns.set()

flights = sns.load_dataset("flights")

flights = flights.pivot("month", "year", "passengers")

ax = sns.heatmap(flights)

plt.title("Heatmap Flight Data")

plt.show()



























No comments:

Post a Comment