How to do it...
One of the most common data visualizations is of time-series data. Visualizing a time series in pandas is as simple as calling .plot() on a DataFrame or Series object that models a time series.
These are the parameters of the Series.plot function:
Series.plot(kind='line', ax=None, figsize=None, use_index=True, title=None, grid=None, legend=False, style=None, logx=False, logy=False, loglog=False, xticks=None, yticks=None, xlim=None, ylim=None, rot=None, fontsize=None, colormap=None, table=False, yerr=None, xerr=None, label=None, secondary_y=False, **kwds)
The following example demonstrates creating a time series that represents a random walk of values over time, akin to the movements in the price of a stock:
The .plot()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access