ComeçarComece de graça

Adding new columns

Adding new columns that derive information from existing data or based on domain knowledge is known as Feature Engineering. Even in relatively simple datasets, there are always new characteristics you could pull out to create a more in-depth analysis.

One of the most critical skills a data scientist needs to learn is how to identify opportunities for feature engineering.

In this exercise, you will add two columns to marketing:

  • channel_code: represents the numeric value of the subscribing channel
  • is_correct_lang: conveys whether the ad was shown to the user in their preferred language

Este exercício faz parte do curso

Analyzing Marketing Campaigns with pandas

Ver curso

Exercício interativo prático

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

# Mapping for channels
channel_dict = {"House Ads": 1, "Instagram": 2, 
                "Facebook": 3, "Email": 4, "Push": 5}

# Map the channel to a channel code
marketing['channel_code'] = marketing['subscribing_channel'].____
Editar e executar o código