Renommer notebook

This commit is contained in:
Antoine JOUBREL 2024-01-13 13:14:11 +00:00
parent 2af25bd339
commit 85cf6cad02

View File

@ -10,7 +10,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 1,
"id": "15103481-8d74-404c-aa09-7601fe7730da",
"metadata": {},
"outputs": [],
@ -32,7 +32,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 2,
"id": "5d83bb1a-d341-446e-91f6-1c428607f6d4",
"metadata": {},
"outputs": [],
@ -60,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 3,
"id": "699664b9-eee4-4f8d-a207-e524526560c5",
"metadata": {},
"outputs": [],
@ -84,7 +84,7 @@
}
],
"source": [
"liste_database_select = ['suppliers', 'ticket', 'purchase', 'consumption', 'customer', 'event', 'target', 'prod', 'campa']\n",
"liste_database_select = ['suppliers', 'ticket', 'purchase', 'consumption', 'type_ofs']\n",
"\n",
"# Filtrer la liste pour les éléments contenant au moins un élément de la liste à tester\n",
"liste_database_filtered = [element for element in liste_database if any(element_part in element for element_part in liste_database_select)]\n",
@ -124,50 +124,6 @@
" globals()[nom_dataframe] = df"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "7d1da9df-f423-4a9f-a2a6-6d8ceeab1c34",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"_\n",
"__\n",
"___\n",
"df\n",
"df1_purchases\n",
"df1_suppliers\n",
"df1_tickets\n",
"dataframe\n",
"_7\n",
"_10\n",
"_11\n",
"_18\n",
"_20\n",
"df1_customer_target_mappings\n",
"df1_customersplus\n",
"df1_event_types\n",
"df1_events\n",
"df1_target_types\n",
"df1_targets\n"
]
}
],
"source": [
"# Obtenir toutes les variables globales\n",
"variables_globales = globals()\n",
"\n",
"# Filtrer les variables pour obtenir uniquement les DataFrames\n",
"dataframes = {nom: variable for nom, variable in variables_globales.items() if isinstance(variable, pd.DataFrame)}\n",
"\n",
"# Afficher les noms et les DataFrames\n",
"for nom, dataframe in dataframes.items():\n",
" print(f\"{nom}\")"
]
},
{
"cell_type": "markdown",
"id": "78453f3c-4f89-44ed-a6c6-2a7443b72b52",
@ -407,97 +363,22 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"id": "6d7f338e-e4d3-422b-9cdc-dec967c0b28e",
"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>0</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>id</th>\n",
" <td>0.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>name</th>\n",
" <td>0.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>manually_added</th>\n",
" <td>0.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>label</th>\n",
" <td>100.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>itr</th>\n",
" <td>100.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>updated_at</th>\n",
" <td>0.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>created_at</th>\n",
" <td>0.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>commission</th>\n",
" <td>100.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>identifier</th>\n",
" <td>0.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0\n",
"id 0.0\n",
"name 0.0\n",
"manually_added 0.0\n",
"label 100.0\n",
"itr 100.0\n",
"updated_at 0.0\n",
"created_at 0.0\n",
"commission 100.0\n",
"identifier 0.0"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"pd.DataFrame(df1_suppliers.isna().mean()*100)"
"df1_suppliers.isna().mean()*100"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3c645ab7-16bf-4054-9ae2-15a8c32e29c6",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "676a9869-9a8b-4cd2-8b1c-0644b5229c72",