icon

Data Visualization for Machine Learning

Last modified: 2024-06-19

Simple Example

import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('example.csv', index_col=0)

plt.figure(figsize=(5, 6))

# Choose a graph type
plt.bar(df['Name'], df['Age'], color='red')
# or
plt.scatter(df['Name'], df['Age'], alpha=0.5)

# Set title and labels
plt.title("Example Title")
plt.xlabel("Name")
plt.ylabel("Age")

# Display
plt.show()