Solution: Oil vs. Banks During Recession
Explore how to merge multiple stock datasets from banks and oil companies, assign meaningful column names, and calculate maximum and minimum closing prices. This lesson helps you apply Python's pandas library functions for effective data combination and statistical analysis during a recession.
Task 1: Combining all datasets
Combine all the bank (RBC, CIBC, BMO) and oil company (Suncor, Encana, CNQ) datasets into a single dataset ‘bo’ (‘b’ for bank and ‘o’ for oil) and check the head of the dataset.
Hint: Use
tickers = ['RBC', 'CIBC', 'BMO', 'Suncor',...