目前,当我尝试从极坐标日期时间列中检索日期时,我必须写一些东西。如同:
df = pl.DataFrame({
'time': [dt.datetime.now()]
})
df = df.select([
pl.col("*"),
pl.col("time").apply(lambda x: x.date()).alias("date")
])
Run Code Online (Sandbox Code Playgroud)
有没有不同的方式,更接近:
pl.col("time").dt.date().alias("date")
Run Code Online (Sandbox Code Playgroud)