以下のようにすると、ウィンドウが開きcsvファイルの中身を表示できる。
import matplotlib.pyplot as plt
import csv
csv_file = "example.csv"
with open(csv_file) as f:
reader = csv.reader(f)
contens_of_csv = [row for row in reader]
fig, ax = plt.subplots(1, 1)
data = contens_of_csv[1:]
column_labels = contens_of_csv[0]
ax.axis("tight")
ax.axis("off")
ax.table(cellText=data, colLabels=column_labels, loc="center")
plt.show()