
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
104 Views
To get the second component of the Period, use the period.second property. At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Ccreating two Period objectsperiod1 = pd.Period("2020-09-23 05:55:30") period2 = pd.Period(freq="S", year = 2021, month = 7, day = 16, hour = 2, ... Read More

AmitDiwan
489 Views
To get the quarter of the year component of the Period, use the period.quarter property. At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objectsperiod1 = pd.Period("2020-02-27 08:32:48") period2 = pd.Period(freq="M", year = 2021, month = 8, day = 16, hour ... Read More

AmitDiwan
306 Views
To get the month of the year component of the Period, use the period.month property. At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objectsperiod1 = pd.Period("2020-09-23 05:55:30") period2 = pd.Period(freq="M", year = 2021, month = 8, day = 16, ... Read More

AmitDiwan
99 Views
To get the minute of the hour component of the Period, use the period.minute property. At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objectsperiod1 = pd.Period("2020-09-23 05:55:30") period2 = pd.Period(freq="T", year = 2021, month = 7, day = 16, ... Read More

AmitDiwan
228 Views
To check whether the year is a leap year from the Period object, use the period.is_leap_year property. At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objectsperiod1 = pd.Period("2020-09-23 05:55:30") period2 = pd.Period(freq="Y", year = 2021, month = 7, day ... Read More

AmitDiwan
127 Views
To get the hour of the day component of the Period, use the period.hour property.At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objects −period1 = pd.Period("2020-09-23 05:55:30") period2 = pd.Period(freq="H", year = 2021, month = 7, day = 16, ... Read More

AmitDiwan
127 Views
To return the string alias of the Time series frequency applied on the given Period object, use the period.freqstr property.At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objects −period1 = pd.Period("2020-09-23 03:55:20") period2 = pd.Period(freq="Y", year = 2021, month ... Read More

AmitDiwan
208 Views
To find the end time for the given Period object, use the period.end_time property.At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objects −period1 = pd.Period("2020-09-23 03:55:20") period2 = pd.Period(freq="T", year = 2021, month = 2, day = 14, hour ... Read More

AmitDiwan
462 Views
To get the frequency for the given Period object, use the period.freq property.At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objects −period1 = pd.Period("2020-09-23 03:55:20") period2 = pd.Period(freq="T", year = 2021, month = 2, day = 14, hour = 2, ... Read More

AmitDiwan
711 Views
To get the total number of days of the month that a Period falls on, use the period.daysinmonth property.At first, import the required libraries −import pandas as pdThe pandas.Period represents a period of time. Creating two Period objects −period1 = pd.Period("2020-09-23") period2 = pd.Period(freq="D", year = 2021, month = 2, ... Read More