ComeçarComece de graça

Working with datasets - combining datasets

In this example, we will be working with two datasets, df1 and df2. You can print these both out in the console to see what they contain. You will notice that they contain different date formatting.

More specifically, df1 specifies the month by the name (e.g. 02-Feb-18), whereas df2 specifies the month numerically (e.g. 06/01/2018). Additionally, df1 uses a hyphen (-) as a separator, whereas df2 uses a forward slash (/) as a separator.

We will be combining these two datasets to form a consolidated forecast for the quarter. To do this, we will need to parse the different date formats of df1 and df2.

Este exercício faz parte do curso

Financial Forecasting in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

____ = {'Jan': 0, 'Feb': 0, 'Mar': 0}
calendar = {'01': '____', '02': '____', '03': '____'}
Editar e executar o código