我遇到了一个有趣的技术,如果可能的话,我想找到一个类似的方法来测试:
SQL Server: Create New Records from Enumerated Date
select s.id
, DATEADD(day, t.N - 1, s.transaction_dt)
, s.measures
from @Something s
join cteTally t on t.N <= s.units
order by s.id
, s.transaction_dt
, t.N
作为一个基于集合的解决方案,这看起来非常有趣。我的问题是是否有可能在大熊猫身上复制类似的东西?地址:
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.merge_asof.html
当然,有可能。我以您引用的SQL示例为例:
相关问题 更多 >
编程相关推荐