https://app.dataquest.io/m/468/business-metrics/7/date-wrangling
years = list(range(2011,2015))
months = list(range(1,13))
yearmonths = [y*100+m for y in years for m in months]
yearmonths = yearmonths[:-1]
churn = pd.DataFrame({"yearmonth": yearmonths})
chrun = pd.merge(chrun, monthly_churn, 'left', left_on='yearmonth',right_index=True)
chrun.head()
What I expected to happen: the total_chruned from montly_chrun dataframe to appear in the merged dataframe
What actually happened: the final merged column contain duplicates of total_chruned labeled total_chruned_x, total_churned_y duplicated
My solution would be to rename one of these to total_chruned and drop the rest
Please update the instructions
Other details: