O'Reilly logo

Learning Python Data Visualization by Chad Adams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DateY charts

DateY charts work the same as any XY chart, with one exception. Each data point is associated with a date, not a string type in Python with a date but a physical datetime object in our Python code. Each X label will be associated with a date object in our Python code, and Y will either be an integer or a float supplied by us.

Unlike our scatter plots, DateY does include its own function with its own rules to be followed. Let's build a very simple DateY chart to see what we are dealing with. Firstly, before running the following code, take a look at the datetime library, specifically datetime and timedelta.

The datetime library is a built-in library for Python and is pretty straightforward. It allows dates to be saved to code from the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required