Skip to content

Instantly share code, notes, and snippets.

@loreno-heer
Created November 12, 2022 11:57
Show Gist options
  • Save loreno-heer/caee38e51a14cc1079b5dc09a3cbffcf to your computer and use it in GitHub Desktop.
Save loreno-heer/caee38e51a14cc1079b5dc09a3cbffcf to your computer and use it in GitHub Desktop.
Reading a Excel file with pandas and plotting it with matplotlib. May need to install dependencies (pip install pandas, pip install matplotlib, pip install openpyxl)
import pandas as pd
import matplotlib.pyplot as plt
# import matplotlib.dates
data = pd.read_excel("test.xlsx")
N = list(data['n'])
P = list(data['P'])
plt.figure()
plt.plot(N,P)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment