some changes

This commit is contained in:
Basyrov Rustam
2024-11-22 14:25:08 +03:00
parent 4c7205f9ac
commit 8971d6a55b

View File

@@ -220,88 +220,28 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 36,
"id": "a0f238ba",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>account_id</th>\n",
" <th>created_date</th>\n",
" <th>campaign</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>3842380.0</td>\n",
" <td>2021-01-01</td>\n",
" <td>BRA_MS1_install</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>3842381.0</td>\n",
" <td>2021-01-01</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3842382.0</td>\n",
" <td>2021-01-01</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3842383.0</td>\n",
" <td>2021-01-01</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>3842384.0</td>\n",
" <td>2021-01-01</td>\n",
" <td>BRA_MS1_install</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" account_id created_date campaign\n",
"0 3842380.0 2021-01-01 BRA_MS1_install\n",
"1 3842381.0 2021-01-01 NaN\n",
"2 3842382.0 2021-01-01 NaN\n",
"3 3842383.0 2021-01-01 NaN\n",
"4 3842384.0 2021-01-01 BRA_MS1_install"
"array(['BRA_MS1_install', 'RUS_MS1_install', 'UKR_MS1_install',\n",
" 'BRA_MS1_purchase', 'RUS_MS1_purchase', 'PR_youtube_bloger',\n",
" 'UKR_MS1_purchase', 'ENG_MS2_install', 'BRA_MS2_install', 'our_fb'],\n",
" dtype=object)"
]
},
"execution_count": 19,
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"registrations = pd.read_csv(\"data/registrations.csv\", index_col=0)\n",
"registrations.head()"
"registrations = pd.read_csv(\"data/registrations.csv\", index_col=0).dropna()\n",
"registrations.head()\n",
"registrations['campaign'].unique()"
]
},
{
@@ -495,10 +435,48 @@
"## Оптимальный срок окупаемости"
]
},
{
"cell_type": "markdown",
"id": "1701b5e5",
"metadata": {},
"source": [
"$$\\Large\n",
"T = \\frac{IC}{FV}\n",
"$$\n",
"\n",
"где:\n",
"\n",
"- $\\large T$ — срок окупаемости\n",
"- $\\large IC$ — инвестиционные расходы\n",
"- $\\large FV$ — прибыль"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "33a0a78b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['BRA_MS1_install']"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"campaigns = list(registrations['campaign'].unique()[:1])\n",
"campaigns"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f5e6e89a",
"id": "35f2e77d",
"metadata": {},
"outputs": [],
"source": []