I have daily data from capital trades and I would like to resample and get the weekly value of buys and sells for each stock here is the data
I have tried
df = trades.set_index("Date")
# df.index = df.index - pd.tseries.frequencies.to_offset("7D")
df = df.resample("W").agg({"Value": sum}).reset_index()
df
and
df = trades.set_index("Date")
# df.index = df.index - pd.tseries.frequencies.to_offset("7D")
df = df.resample("W").agg({"Value": sum, 'Ticker': '-'.join}).reset_index()
df
but I cannot get the Ticker column correctly