LoslegenKostenlos loslegen

Plotting a time series (II)

You'll now plot both the datasets again, but with the included time stamps for each (stored in the column called "time"). Let's see if this gives you some more context for understanding each time series data.

Diese Übung ist Teil des Kurses

Machine Learning for Time Series Data in Python

Kurs anzeigen

Anleitung zur Übung

  • Plot data and data2 on top of one another, one per axis object.
  • The x-axis should represent the time stamps and the y-axis should represent the dataset values.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Plot the time series in each dataset
fig, axs = plt.subplots(2, 1, figsize=(5, 10))
data.iloc[:1000].plot(x=____, y=____, ax=axs[0])
data2.iloc[:1000].plot(x=____, y=____, ax=axs[1])
plt.show()
Code bearbeiten und ausführen