finish
This commit is contained in:
@@ -778,14 +778,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 29,
|
||||
"id": "e950eeaf",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"T_df = pd.DataFrame(T, columns=[\"Media Source\", 'Campaign type', 'Target', \"Time, (months)\"])\n",
|
||||
"T_df = T_df.set_index([\"Media Source\", 'Campaign type', 'Target'])\n",
|
||||
"T_df.to_csv('tables/payback-period.csv')"
|
||||
"T_df.to_csv('tables/payback-period.csv')\n",
|
||||
"T_df.to_markdown('tables/payback-period.md')"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -837,13 +838,14 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 30,
|
||||
"id": "9dfee9c7",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"T_sorted_df = T_df.sort_values(by='Time, (months)')\n",
|
||||
"T_sorted_df.to_csv('tables/payback-period.sorted.csv')"
|
||||
"T_sorted_df.to_csv('tables/payback-period.sorted.csv')\n",
|
||||
"T_sorted_df.to_markdown('tables/payback-period.sorted.md')"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1197,7 +1199,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"execution_count": 31,
|
||||
"id": "f2c30d3d",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -1206,7 +1208,8 @@
|
||||
"# df_ARPU\n",
|
||||
"df_ARPU['days'] = list(map(lambda x: f\"{x} days\" if x > 1 else f\"{x} day\", dates))\n",
|
||||
"df_ARPU_melted = df_ARPU.melt('days', var_name='Campaign type', value_name='ARPU')\n",
|
||||
"df_ARPU.iloc[[6, 13, 29]].to_csv('tables/arpu.csv')"
|
||||
"df_ARPU.iloc[[6, 13, 29]].to_csv('tables/arpu.csv')\n",
|
||||
"df_ARPU.iloc[[6, 13, 29]].to_markdown('tables/arpu.md')"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1297,7 +1300,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"execution_count": 32,
|
||||
"id": "b7a20a84",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -1305,7 +1308,8 @@
|
||||
"df = pd.DataFrame(CPI, columns=[\"Media Source\", 'Campaign type', 'Target', \"CPI\"])\n",
|
||||
"df = df.set_index([\"Media Source\", 'Campaign type', 'Target'])\n",
|
||||
"df = df.sort_values(by='CPI')\n",
|
||||
"df.to_csv('tables/cpi.sorted.csv')"
|
||||
"df.to_csv('tables/cpi.sorted.csv')\n",
|
||||
"df.to_markdown('tables/cpi.sorted.md')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user