1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
# -*- coding: utf-8 -*-
from dataiku import Dataset
import pandas as pd
# Input datasets
customer_shaked =
Dataset("customer_shaked").get_dataframe()
CountryGDP = Dataset("CountryGDP").get_dataframe()
CountryPopulation = Dataset("CountryPopulation").get_dataframe()
CountryGDP.columns=['country','GDP_inhab']
CountryPopulation.columns=['country','population']
customer_shaked=pd.merge(customer_shaked,CountryGDP)
customer_shaked=pd.merge(customer_shaked,CountryPopulation)
# Output datasets
customer_enriched = Dataset("customer_enriched")
customer_enriched.write_with_schema(customer_shaked) |
Partager