Series.dt can be used to access series values as datetimelike and return multiple properties.
Series.dt.quarter returns a quarter of a date in the underlying data based on a date and time in this series object.
Returns: numpy array
Example # 1: Use the
Series.dt.quarter attribute to return a quarter of the date in the underlying data of this Series object.
Now we will use the
Series.dt attribute .quarter to return the quarter date in the data based on the date and time in the given series object.
As we can see from the output, the attribute
Series.dt.quarter successfully accessed and returned a quarter date in the underlying data of this series object.
Example # 2: Use the
Series attribute .dt.quarter to return the quarter date in the underlying data of this Series object.
We will now use the
Series.dt.quarter attribute to return a quarter date in the data to based on the date and time in the given series object.
As we can see from the output, the
Series.dt.quarter attribute successfully accessed and returned a quarter date in the underlying data this series object.
Learn how data literacy is changing the world and giving you a better understanding of life's biggest problems in this "Important and Comprehensive" Guide to Statistical Thinking (New York). The bi...
If you’ve picked up this book, you’re probably aware of the extraordinary progress that deep learning has represented for the field of artificial intelligence in the recent past. In a mere five ye...
This book contains chapters authored by several leading experts in the field of cloud computing. The book is presented in a coordinated and integrated manner starting with the fundamentals and followe...
Grokking Deep Learning teaches you to build deep learning neural networks from scratch! In his immersive style, deep learning expert Andrew Trask shows you the hidden science so you can uncover every ...