This commit is contained in:
benmiroglio 2019-06-04 14:57:13 -07:00
Родитель 4572a7b39d
Коммит b1a947ed1d
3 изменённых файлов: 22 добавлений и 25 удалений

Просмотреть файл

@ -350,13 +350,10 @@ def install_flow_events(events):
agg = (
installs.na.fill(0)
.select("addon_id", source_map(installs, "installs", "n_distinct_users"))
.join(
installs.na.fill(0).select(
"addon_id", source_map(installs, "download_times", "avg_download_time")
),
on="addon_id",
how="full",
.select(
"addon_id",
source_map(installs, "installs", "n_distinct_users"),
source_map(installs, "download_times", "avg_download_time"),
)
.join(
uninstalls.na.fill(0).select(
@ -430,7 +427,7 @@ def get_search_metrics(search_daily_df, addons_expanded):
)
)
df_mapped = df.select(
df_mapped = df.na.fill(0).select(
"addon_id",
engine_map(df, "search_with_ads"),
engine_map(df, "ad_click"),

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -500,64 +500,64 @@ def test_searches_and_ads(search_clients_daily, addons_expanded_day, spark):
{
"addon_id": "baidu-code-update@mozillaonline.com",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},
{
"addon_id": "screenshots@mozilla.org",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},
{
"addon_id": "non-system-addon1",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},
{
"addon_id": "hotfix-update-xpi-intermediate@mozilla.com",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},
{
"addon_id": "fxmonitor@mozilla.org",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},
{
"addon_id": "non-system-addon2",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},
{
"addon_id": "formautofill@mozilla.org",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},
{
"addon_id": "webcompat@mozilla.org",
"search_with_ads": {"google": 3},
"ad_click": {"google": None},
"organic_searches": {"google": None},
"ad_click": {"google": 0},
"organic_searches": {"google": 0},
"sap_searches": {"google": 10},
"tagged_sap_searches": {"google": 10},
},