Pandas tseries offsets CustomBusinessMonthBegin property m_offset in Python
The Pandas tseries offsets CustomBusinessMonthBegin property m_offset used to retrieve the month offset from the CustomBusinessMonthBegin object. It returns a MonthBegin object.
Syntax
 1 CustomBusinessMonthBegin.m_offset
m_offset property
 1 import pandas as pd
 2 
 3 offset = pd.tseries.offsets.CustomBusinessMonthBegin(n = 2)
 4 res = offset.m_offset
 5 print(f'The month offset of CustomBusinessMonthBegin : {res}')
 6 print(f'The month offset unit frequency is : {res.n}')
In the above example, a CustomBusinessMonthBegin object is created by passing a unit frequency. A resulting MonthBegin offset is assign to the variable that will be printed on console along with unit frequency.
Output
 1 The month offset of CustomBusinessMonthBegin : <MonthBegin>
 2 The month offset unit frequency is : 1

Example 2

Example 2
 1 import pandas as pd
 2 
 3 offset = pd.tseries.offsets.CustomBusinessMonthBegin(normalize = True)
 4 res = offset.m_offset
 5 print(f'The month offset of CustomBusinessMonthBegin : {res}')
 6 print(f'The month offset unit frequency is : {res.n}')
In the above example, a CustomBusinessMonthBegin object is created without a unit frequency and normalize as true. A resulting MonthBegin offset is assign to the variable.
Output
 1 The month offset of CustomBusinessMonthBegin : <MonthBegin>
 2 The month offset unit frequency is : 1

Example 3

Example 3
 1 import pandas as pd
 2 
 3 offset1 = pd.tseries.offsets.CustomBusinessMonthBegin(n = 3, normalize = True)
 4 res1 = offset1.m_offset
 5 print(f'The month offset of CustomBusinessMonthBegin : {res1}')
 6 print(f'The month offset unit frequency is : {res1.n}')
In the above example, a CustomBusinessMonthBegin object is created with a unit frequency and normalize as true. A resulting MonthBegin offset is assign to the variable.
Output
 1 The month offset of CustomBusinessMonthBegin : <MonthBegin>
 2 The month offset unit frequency is : 1
Privacy Policy
Terms of Service
Disclaimer
Contact us
About us