The Pandas tseries offsets BusinessHour property used to retrieve the a copy of the calling offset object with n = 1 and all other attributes equal.
1 import pandas as pd
2
3 offset = pd.offsets.BusinessHour(n = 4)
4 print('The business hour base :')
5 print(offset.base)
In the above example, a BusinessHour object is created by passing an n value. A base property is access that returns a copy with offset object that assign to the variable that will be printed on console.
1 The business hour base :
2 <BusinessHour: BH=09:00-17:00>
BusinessHour with start and end
BusinessHour with start and end
1 import pandas as pd
2
3 offset = pd.offsets.BusinessHour(start = '11:00', end = '18:00')
4 print('The business hour base :')
5 print(offset.base)
In the above example, a BusinessHour object is created by passing a start and end time. A base property is access that returns a copy with offset object that assign to the variable that will be print.
1 The business hour base :
2 <BusinessHour: bh=11:00-18:00>
BusinessHour with normalize as True
BusinessHour with normalize as True
1 import pandas as pd
2
3 offset = pd.offsets.BusinessHour(normalize = True)
4 print('The business hour base :')
5 print(offset.base)
In the above example, a BusinessHour object is created by passing a normalize as true. A base property is access that returns a copy with offset object that assign to the variable that will be print.
1 The business hour base :
2 <BusinessHour: bh=09:00-17:00>
Related options for your search