LM | Simple Visualisations |
Simple Visualisations
Visualization is a key skill for communicating your data insights. In Python, you often use:
matplotlib
for creating plots and chartspandas
integrated plotting functions for quick visual checks
You learned to create line plots, bar charts, and histograms to better understand and present your data.
Example
import pandas as pd
import matplotlib.pyplot as plt
# Example data
data = {
"Year": [2020, 2021, 2022],
"Sales": [100, 150, 200]
}
df = pd.DataFrame(data)
# Line plot
plt.plot(df["Year"], df["Sales"], marker="o")
plt.title("Sales over Years")
plt.xlabel("Year")
plt.ylabel("Sales")
plt.grid(True)
plt.show()
Creating simple plots helps you quickly explore trends and share your findings visually.