python判断一个数是否在一个区间内_python如何检验一个数值是否属于某个区间?...

TypeError Traceback (most recent call last)pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.BaseOffset._validate_n()TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'

During handling of the above exception, another exception occurred:TypeError Traceback (most recent call last) in 22 count_businessday(start_day,end_day) 23 ---> 24 sheet['工作日'] = sheet.apply(lambda x:count_businessday(x['出院时间'],x['归档日期']),axis=1)D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py in apply(self, func, axis, raw, result_type, args, **kwds) 7546 kwds=kwds, 7547 )-> 7548 return op.get_result() 7549 7550 def applymap(self, func) -> "DataFrame":D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\apply.py in get_result(self) 178 return self.apply_raw() 179 --> 180 return self.apply_standard() 181 182 def apply_empty_result(self):D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\apply.py in apply_standard(self) 269 270 def apply_standard(self):--> 271 results, res_index = self.apply_series_generator() 272 273 # wrap resultsD:\ProgramData\Anaconda3\lib\site-packages\pandas\core\apply.py in apply_series_generator(self) 298 for i, v in enumerate(series_gen): 299 # ignore SettingWithCopy here in case the user mutates--> 300 results[i] = self.f(v) 301 if isinstance(results[i], ABCSeries): 302 # If we have a view on v, we need to make a copy because in (x) 22 count_businessday(start_day,end_day) 23 ---> 24 sheet['工作日'] = sheet.apply(lambda x:count_businessday(x['出院时间'],x['归档日期']),axis=1) in count_businessday(start_day, end_day) 4 '2020-10-05','2020-10-06','2020-10-07','2020-10-08'] 5 holidays=[pd.Timestamp(i) for i in holidays]----> 6 b = CustomBusinessDay(holidays) 7 bus_day = pd.date_range(start=start_day, end=end_day, freq=b) 8 length = len(bus_day)pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__()pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.BusinessMixin.__init__()pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.BaseOffset.__init__()pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.BaseOffset._validate_n()TypeError: `n` argument must be an integer, got

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值