df/series.str.slice(start, stop, step) == df/series.str[start:stop:step] 但是在query中不允许后者写法!

ob_waim.df10.开票日期.str.slice(0,7) # 字符串格式列
ob_waim.df10.query("开票日期.str.slice(0,7) == '2023-01'") # 可以
ob_waim.df10.query("开票日期.str[0:7:] == '2023-01'") # 不可以