The Pandas tseries offsets CustomBusinessMonthEnd property n used to retrieve the unit frequency. It returns a number that represents the unit frequency.
1 CustomBusinessMonthEnd.n
1 import pandas as pd
2
3 offset = pd.tseries.offsets.CustomBusinessMonthEnd()
4 res = offset.n
5 print(f'The unit frequency of CustomBusinessMonthEnd : {res}')
6
7 offset1 = pd.tseries.offsets.CustomBusinessMonthEnd(n = 4)
8 res1 = offset1.n
9 print(f'The unit frequency of CustomBusinessMonthEnd : {res1}')
In the above example, a CustomBusinessMonthEnd objects are created with and without unit frequency. A n property is access that returns unit frequency that assign to the variable that will be printed on console.
1 The unit frequency of CustomBusinessMonthEnd : 1
2 The unit frequency of CustomBusinessMonthEnd : 4
Example 2
1 import pandas as pd
2
3 offset = pd.offsets.CustomBusinessMonthEnd(normalize = True)
4 res = offset.n
5 print(f'The unit frequency of CustomBusinessMonthEnd : {res}')
In the above example, a CustomBusinessMonthEnd objects are created with and without unit frequency and normalize as true. A n property is access that returns unit frequency that assign to the variable.
1 The unit frequency of CustomBusinessMonthEnd : 1
Example 3
1 import pandas as pd
2
3 offset1 = pd.offsets.CustomBusinessMonthEnd(n = 3, normalize = True)
4 res1 = offset1.n
5 print(f'The unit frequency of CustomBusinessMonthEnd : {res1}')
In the above example, a CustomBusinessMonthEnd objects are created with and with unit frequency and normalize as true. A n property is access that returns unit frequency that assign to the variable.
1 The unit frequency of CustomBusinessMonthEnd : 3
Related options for your search