Code: Alles auswählen
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel(r'C:\Users\marco\Desktop\Gm.xlsx', skiprows=0, sheet_name='MASCHDAT') df = pd.DataFrame(data, columns= ['DATUM','W020','W023'])
df['DATUM'] = df['DATUM'].apply(pd.to_datetime)
df.set_index('DATUM',inplace=True)
plt.rcParams['figure.figsize'] = (15, 8)
x = df.index
y1 = df['W020'].iloc[47220:60502]
y2 = df['W023'].iloc[47220:60502]
fig, ax1 = plt.subplots()
ax2 = ax1.twinx()
curve1 = ax1.plot(x, y1, label='W020', color='r')
curve2 = ax2.plot(x, y2, label='W023', color='b')
plt.plot()
plt.show()
df.head()
df.tail()
print(df.head())
print(df.tail())