我写了这个函数: '''this function creates the timestamp column for the dataframeinput: dataframe, dateToday(type: pandas.core.series.Series) '''dateAndTime]).astype(int) / 10**
我有两个Pandas数据帧:一个带有每日数据,一个带有每周数据。我想将每周数据添加到A列每组的每日数据的每一行。例如,对于2022/07/04至2022/07/09期间的每日数据帧中的每一行,我希望为每组A列添加2022/07/04期间的每周数据。下面的代码再现了所需的结果:import pandas as pd
import