0

I have daily price data on Bitcoin and the USD/EUR. I resampled them to monthly data by

usd_df_m = usd_df.resample("M", on="Date").mean()

df_months = df.resample("M", on="Date").mean()

I also got data on the monthly federal funds rate. I tried to merge all three monthly data frames by

monthly_merge = df_months.merge(usd_df_m,on='Date').merge(int_df,on='Date')

The problem is that the int_df looks like this:

enter image description here

and the Bitcoin df and USD df looks like this:

enter image description here

So how would you solve this if one df takes the first of a month and the other always take the last of a month?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
  • 3
    run `usd_df.resample("MS", on="Date").mean()` https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects – Panda Kim Apr 28 '23 at 10:34

0 Answers0