From 347a47638d98e45b04b43341b0421aae608f6bd3 Mon Sep 17 00:00:00 2001 From: Saurabh <115889474+saurabhmitrainbox@users.noreply.github.com> Date: Wed, 10 Sep 2025 12:25:37 -0600 Subject: [PATCH 1/2] Add files via upload --- 1.0-+Handling+Missing+values+(1) (1).ipynb | 1300 ++++++++++++++++++++ 1 file changed, 1300 insertions(+) create mode 100644 1.0-+Handling+Missing+values+(1) (1).ipynb diff --git a/1.0-+Handling+Missing+values+(1) (1).ipynb b/1.0-+Handling+Missing+values+(1) (1).ipynb new file mode 100644 index 00000000..0df78aba --- /dev/null +++ b/1.0-+Handling+Missing+values+(1) (1).ipynb @@ -0,0 +1,1300 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "3dd8b074-7ec3-442d-af52-1619f855c7b2", + "metadata": {}, + "source": [ + "## Missing Values\n", + "Missing values occurs in dataset when some of the informations is not stored for a variable\n", + "There are 3 mechanisms" + ] + }, + { + "cell_type": "markdown", + "id": "4bb93475-60a8-4125-96e3-79df86b32111", + "metadata": {}, + "source": [ + "### 1 Missing Completely at Random, MCAR:\n", + "Missing completely at random (MCAR) is a type of missing data mechanism in which the probability of a value being missing is unrelated to both the observed data and the missing data. In other words, if the data is MCAR, the missing values are randomly distributed throughout the dataset, and there is no systematic reason for why they are missing.\n", + "\n", + "For example, in a survey about the prevalence of a certain disease, the missing data might be MCAR if the survey participants with missing values for certain questions were selected randomly and their missing responses are not related to their disease status or any other variables measured in the survey.\n" + ] + }, + { + "cell_type": "markdown", + "id": "58a71c0b-6d4c-4526-aa75-2fcdb4d0034d", + "metadata": {}, + "source": [ + "### 2. Missing at Random MAR:\n", + "Missing at Random (MAR) is a type of missing data mechanism in which the probability of a value being missing depends only on the observed data, but not on the missing data itself. In other words, if the data is MAR, the missing values are systematically related to the observed data, but not to the missing data.\n", + "Here are a few examples of missing at random:\n", + "\n", + "Income data: Suppose you are collecting income data from a group of people, but some participants choose not to report their income. If the decision to report or not report income is related to the participant's age or gender, but not to their income level, then the data is missing at random.\n", + "\n", + "Medical data: Suppose you are collecting medical data on patients, including their blood pressure, but some patients do not report their blood pressure. If the patients who do not report their blood pressure are more likely to be younger or have healthier lifestyles, but the missingness is not related to their actual blood pressure values, then the data is missing at random." + ] + }, + { + "cell_type": "markdown", + "id": "bb33e369-b0b8-427e-9be0-5619edb1bea6", + "metadata": {}, + "source": [ + "## 3. Missing data not at random (MNAR) \n", + "It is a type of missing data mechanism where the probability of missing values depends on the value of the missing data itself. In other words, if the data is MNAR, the missingness is not random and is dependent on unobserved or unmeasured factors that are associated with the missing values.\n", + "\n", + "For example, suppose you are collecting data on the income and job satisfaction of employees in a company. If employees who are less satisfied with their jobs are more likely to refuse to report their income, then the data is not missing at random. In this case, the missingness is dependent on job satisfaction, which is not directly observed or measured." + ] + }, + { + "cell_type": "markdown", + "id": "ffbf6ed9-0613-4393-b870-5b983c19307b", + "metadata": {}, + "source": [ + "## Examples" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "abea8a2b-613c-40d0-8935-44c26549ea2c", + "metadata": {}, + "outputs": [], + "source": [ + "import seaborn as sns" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "77275365-3d0d-409a-b2e8-b1a7f1ba213c", + "metadata": {}, + "outputs": [], + "source": [ + "df=sns.load_dataset('titanic')" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "20b9a34a-7f7f-420c-9ef9-a1ff772605c2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
survivedpclasssexagesibspparchfareembarkedclasswhoadult_maledeckembark_townalivealone
003male22.0107.2500SThirdmanTrueNaNSouthamptonnoFalse
111female38.01071.2833CFirstwomanFalseCCherbourgyesFalse
213female26.0007.9250SThirdwomanFalseNaNSouthamptonyesTrue
311female35.01053.1000SFirstwomanFalseCSouthamptonyesFalse
403male35.0008.0500SThirdmanTrueNaNSouthamptonnoTrue
\n", + "
" + ], + "text/plain": [ + " survived pclass sex age sibsp parch fare embarked class \\\n", + "0 0 3 male 22.0 1 0 7.2500 S Third \n", + "1 1 1 female 38.0 1 0 71.2833 C First \n", + "2 1 3 female 26.0 0 0 7.9250 S Third \n", + "3 1 1 female 35.0 1 0 53.1000 S First \n", + "4 0 3 male 35.0 0 0 8.0500 S Third \n", + "\n", + " who adult_male deck embark_town alive alone \n", + "0 man True NaN Southampton no False \n", + "1 woman False C Cherbourg yes False \n", + "2 woman False NaN Southampton yes True \n", + "3 woman False C Southampton yes False \n", + "4 man True NaN Southampton no True " + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "e0ba0c62-f471-428f-8499-e562865b7574", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "survived 0\n", + "pclass 0\n", + "sex 0\n", + "age 177\n", + "sibsp 0\n", + "parch 0\n", + "fare 0\n", + "embarked 2\n", + "class 0\n", + "who 0\n", + "adult_male 0\n", + "deck 688\n", + "embark_town 2\n", + "alive 0\n", + "alone 0\n", + "dtype: int64" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "## Check missing values\n", + "df.isnull().sum()" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "55074d6f-aedc-43f2-b47c-7dbce29a73dc", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(891, 15)" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "## Delete the rows or data point to handle missing values\n", + "\n", + "df.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "87f9eb64-611f-4329-b5a7-c088998ddd42", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(182, 15)" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.dropna().shape" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "fe6e7b61-21c9-445d-9151-45df80bed667", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
survivedpclasssexsibspparchfareclasswhoadult_malealivealone
003male107.2500ThirdmanTruenoFalse
111female1071.2833FirstwomanFalseyesFalse
213female007.9250ThirdwomanFalseyesTrue
311female1053.1000FirstwomanFalseyesFalse
403male008.0500ThirdmanTruenoTrue
....................................
88602male0013.0000SecondmanTruenoTrue
88711female0030.0000FirstwomanFalseyesTrue
88803female1223.4500ThirdwomanFalsenoFalse
88911male0030.0000FirstmanTrueyesTrue
89003male007.7500ThirdmanTruenoTrue
\n", + "

891 rows × 11 columns

\n", + "
" + ], + "text/plain": [ + " survived pclass sex sibsp parch fare class who \\\n", + "0 0 3 male 1 0 7.2500 Third man \n", + "1 1 1 female 1 0 71.2833 First woman \n", + "2 1 3 female 0 0 7.9250 Third woman \n", + "3 1 1 female 1 0 53.1000 First woman \n", + "4 0 3 male 0 0 8.0500 Third man \n", + ".. ... ... ... ... ... ... ... ... \n", + "886 0 2 male 0 0 13.0000 Second man \n", + "887 1 1 female 0 0 30.0000 First woman \n", + "888 0 3 female 1 2 23.4500 Third woman \n", + "889 1 1 male 0 0 30.0000 First man \n", + "890 0 3 male 0 0 7.7500 Third man \n", + "\n", + " adult_male alive alone \n", + "0 True no False \n", + "1 False yes False \n", + "2 False yes True \n", + "3 False yes False \n", + "4 True no True \n", + ".. ... ... ... \n", + "886 True no True \n", + "887 False yes True \n", + "888 False no False \n", + "889 True yes True \n", + "890 True no True \n", + "\n", + "[891 rows x 11 columns]" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "## Column wise deletion\n", + "df.dropna(axis=1)" + ] + }, + { + "cell_type": "markdown", + "id": "65a0a885-6f34-4472-b510-6538bda7e6b1", + "metadata": {}, + "source": [ + "## Imputation Missing Values\n", + "### 1- Mean Value Imputation" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "86bd08d6-f8e6-4719-94fb-86e5082de515", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjsAAAGwCAYAAABPSaTdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAABVwUlEQVR4nO3deXhU5f028PvMmpns+75CIEDY90UBWawCVakroqi1xYoK0ipSrKBVEG2R/kRR1LpC8W0Fi1UEBAwgIhAIhBACCYHsCZNtss4kM+f9Y8hIZE2YyZk5c3+ua66ac86cfJ8SJjfPeRZBFEURRERERDKlkLoAIiIiImdi2CEiIiJZY9ghIiIiWWPYISIiIllj2CEiIiJZY9ghIiIiWWPYISIiIllTSV2AK7BarSgpKYGvry8EQZC6HCIiIroGoiiirq4OUVFRUCgu33/DsAOgpKQEsbGxUpdBREREnVBYWIiYmJjLnmfYAeDr6wvA9n+Wn5+fxNUQERHRtTAajYiNjbX/Hr8chh3A/ujKz8+PYYeIiMjNXG0ICgcoExERkawx7BAREZ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x9OnT4r59+8SpU6eKvr6+9s8Vd2/f/v37RZVKJb7yyiviqVOnxLVr14p6vV787LPP7Ne4extFURQtFosYFxcnLliw4KJz7t6+WbNmidHR0fap5xs2bBBDQkLEZ5991n6NlG1k2HGCt956S4yPjxc1Go04aNAg+zRmd7Nz504RwEWvWbNmiaJom0q4ePFiMSIiQtRqteKNN94oZmZmSlt0B12qfQDEDz/80H6NO7fzkUcesf8shoaGihMmTLAHHVF077ZdyS/Djru3s209ErVaLUZFRYnTp08Xs7Ky7OfdvX2iKIpfffWVmJqaKmq1WjElJUVcs2ZNu/NyaOOWLVtEAGJOTs5F59y9fUajUZw7d64YFxcnenl5iUlJSeKiRYtEk8lkv0bKNgqiKIrO7z8iIiIikgbH7BAREZGsMewQERGRrDHsEBERkawx7BAREZGsMewQERGRrDHsEBERkawx7BAREZGsMewQERGRrDHsEBERkawx7BAREZGsMewQERGRrDHsEJFb+vbbbzFmzBgEBAQgODgYU6dORV5env383r17MWDAAHh5eWHIkCH48ssvIQgCMjIy7NccP34ct956K3x8fBAeHo4HHngABoNBgtYQkTMx7BCRW2poaMD8+fNx4MABbN++HQqFAnfccQesVivq6uowbdo09O3bF4cOHcJf//pXLFiwoN37S0tLMXbsWAwYMAAHDx7Et99+i/Lyctx9990StYiInIW7nhORLJw7dw5hYWHIzMzEnj178Pzzz6OoqAheXl4AgPfffx+/+93vcPjwYQwYMAAvvPACfvrpJ2zZssV+j6KiIsTGxiInJwc9evSQqilE5GDs2SEit5SXl4cZM2YgKSkJfn5+SExMBAAUFBQgJycH/fr1swcdABg2bFi796enp2Pnzp3w8fGxv1JSUuz3JiL5UEldABFRZ0ybNg2xsbF47733EBUVBavVitTUVJjNZoiiCEEQ2l3/y05sq9WKadOmYfny5RfdOzIy0qm1E1HXYtghIrdTWVmJ7OxsvPvuu7jhhhsAAHv27LGfT0lJwdq1a2EymaDVagEABw8ebHePQYMG4YsvvkBCQgJUKn4UEskZH2MRkdsJDAxEcHAw1qxZg9zcXOzYsQPz58+3n58xYwasVit+//vfIzs7G1u2bMHf/vY3ALD3+MyZMwdVVVW47777sH//fpw+fRpbt27FI488AovFIkm7iMg5GHaIyO0oFAqsX78e6enpSE1NxdNPP43XX3/dft7Pzw9fffUVMjIyMGDAACxatAgvvPACANjH8URFReGHH36AxWLBzTffjNTUVMydOxf+/v5QKPjRSCQnnI1FRB5h7dq1ePjhh1FbWwudTid1OUTUhfigmohk6ZNPPkFSUhKio6Nx5MgRLFiwAHfffTeDDpEHYtghIlkqKyvDCy+8gLKyMkRGRuKuu+7CK6+8InVZRCQBPsYiIiIiWeMoPCIiIpI1hh0iIiKSNYYdIiIikjWGHSIiIpI1hh0iIiKSNYYdIiIikjWGHSIiIpI1hh0iIiKStf8PlVv+Y42Pn/kAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "sns.histplot(df['age'],kde=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "7e56b782-95fb-4577-a4a0-4bac231704af", + "metadata": {}, + "outputs": [], + "source": [ + "df['Age_mean']=df['age'].fillna(df['age'].mean())" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "cb1bf3b2-8056-4fe0-b1d1-a3228d24d466", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Age_meanage
022.00000022.0
138.00000038.0
226.00000026.0
335.00000035.0
435.00000035.0
.........
88627.00000027.0
88719.00000019.0
88829.699118NaN
88926.00000026.0
89032.00000032.0
\n", + "

891 rows × 2 columns

\n", + "
" + ], + "text/plain": [ + " Age_mean age\n", + "0 22.000000 22.0\n", + "1 38.000000 38.0\n", + "2 26.000000 26.0\n", + "3 35.000000 35.0\n", + "4 35.000000 35.0\n", + ".. ... ...\n", + "886 27.000000 27.0\n", + "887 19.000000 19.0\n", + "888 29.699118 NaN\n", + "889 26.000000 26.0\n", + "890 32.000000 32.0\n", + "\n", + "[891 rows x 2 columns]" + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[['Age_mean','age']]" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "id": "b6098f43-ccf2-4335-bbb1-43ff3e51d124", + "metadata": {}, + "outputs": [], + "source": [ + "## MEan Imputation Works Well when we have normally distributed data" + ] + }, + { + "cell_type": "markdown", + "id": "9f8c727f-33c4-4fdf-91c7-2eb2444252fd", + "metadata": {}, + "source": [ + "### 2. Median Value Imputation- If we have outliers in the dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "4b5dae68-84cf-439a-ab3f-c492003812f7", + "metadata": {}, + "outputs": [], + "source": [ + "df['age_median']=df['age'].fillna(df['age'].median())" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "id": "46ff886c-1e8a-476d-b539-ff47fffc7576", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
age_medianAge_meanage
022.022.00000022.0
138.038.00000038.0
226.026.00000026.0
335.035.00000035.0
435.035.00000035.0
............
88627.027.00000027.0
88719.019.00000019.0
88828.029.699118NaN
88926.026.00000026.0
89032.032.00000032.0
\n", + "

891 rows × 3 columns

\n", + "
" + ], + "text/plain": [ + " age_median Age_mean age\n", + "0 22.0 22.000000 22.0\n", + "1 38.0 38.000000 38.0\n", + "2 26.0 26.000000 26.0\n", + "3 35.0 35.000000 35.0\n", + "4 35.0 35.000000 35.0\n", + ".. ... ... ...\n", + "886 27.0 27.000000 27.0\n", + "887 19.0 19.000000 19.0\n", + "888 28.0 29.699118 NaN\n", + "889 26.0 26.000000 26.0\n", + "890 32.0 32.000000 32.0\n", + "\n", + "[891 rows x 3 columns]" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[['age_median','Age_mean','age']]" + ] + }, + { + "cell_type": "markdown", + "id": "583c0fb9-e89d-4d86-a76b-06ee08c1b88c", + "metadata": {}, + "source": [ + "### 3. Mode Imputation Technqiue--Categorical values" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "id": "7dea92c8-9b7f-4dca-9d68-79a333a8c609", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
survivedpclasssexagesibspparchfareembarkedclasswhoadult_maledeckembark_townalivealoneAge_medianAge_meanage_median
6111female38.00080.0NaNFirstwomanFalseBNaNyesTrue38.038.038.0
82911female62.00080.0NaNFirstwomanFalseBNaNyesTrue62.062.062.0
\n", + "
" + ], + "text/plain": [ + " survived pclass sex age sibsp parch fare embarked class \\\n", + "61 1 1 female 38.0 0 0 80.0 NaN First \n", + "829 1 1 female 62.0 0 0 80.0 NaN First \n", + "\n", + " who adult_male deck embark_town alive alone Age_median Age_mean \\\n", + "61 woman False B NaN yes True 38.0 38.0 \n", + "829 woman False B NaN yes True 62.0 62.0 \n", + "\n", + " age_median \n", + "61 38.0 \n", + "829 62.0 " + ] + }, + "execution_count": 59, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[df['embarked'].isnull()]" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "id": "7ac46b48-ce23-4ff4-a5ba-f9355f4f9af2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['S', 'C', 'Q', nan], dtype=object)" + ] + }, + "execution_count": 60, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df['embarked'].unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "id": "68f3e53b-19b8-4208-8f7d-9710d8666e24", + "metadata": {}, + "outputs": [], + "source": [ + "mode_value=df[df['embarked'].notna()]['embarked'].mode()[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "id": "d21a2598-00d9-4546-b7ca-ee14ef45377f", + "metadata": {}, + "outputs": [], + "source": [ + "df['embarked_mode']=df['embarked'].fillna(mode_value)" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "id": "1ee9908c-75a7-4459-a633-d3cada481c09", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
embarked_modeembarked
0SS
1CC
2SS
3SS
4SS
.........
886SS
887SS
888SS
889CC
890QQ
\n", + "

891 rows × 2 columns

\n", + "
" + ], + "text/plain": [ + " embarked_mode embarked\n", + "0 S S\n", + "1 C C\n", + "2 S S\n", + "3 S S\n", + "4 S S\n", + ".. ... ...\n", + "886 S S\n", + "887 S S\n", + "888 S S\n", + "889 C C\n", + "890 Q Q\n", + "\n", + "[891 rows x 2 columns]" + ] + }, + "execution_count": 68, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[['embarked_mode','embarked']]" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "id": "4c5121c0-b77d-4524-9caf-2f20553562d3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0" + ] + }, + "execution_count": 69, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df['embarked_mode'].isnull().sum()" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "id": "46f5c223-86b3-435e-ab73-9d4f1d80a7f5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 70, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df['embarked'].isnull().sum()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cbc6447a-9d55-40fd-b2bc-91dda833bb79", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fd7f345e-9a13-46eb-828d-2e96021e15ae", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "762413ed-9399-4dd0-9df3-d78899cb64be", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6ff580a3-0ca0-4e2e-b405-a2606be94f9b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "04092936-ac21-4a46-a2b1-dfc0d9e29d25", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "87ffc1b9-e3c9-4fd1-8fab-559ecc8e073a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7987d45d-45f1-4441-93f9-6519f898e74f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "08a194eb-65e5-41d8-9bdf-60a738cd5054", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.8" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 1559d35ef634cd0f2d657e8e86dc62cb3b34d2c1 Mon Sep 17 00:00:00 2001 From: Saurabh <115889474+saurabhmitrainbox@users.noreply.github.com> Date: Mon, 15 Sep 2025 12:32:06 -0600 Subject: [PATCH 2/2] Add files via upload --- numpyassignments.ipynb | 89 ++++++ numpysolutions.ipynb | 592 +++++++++++++++++++++++++++++++++++++++ pandasasssignments.ipynb | 89 ++++++ pandassolution.ipynb | 571 +++++++++++++++++++++++++++++++++++++ 4 files changed, 1341 insertions(+) create mode 100644 numpyassignments.ipynb create mode 100644 numpysolutions.ipynb create mode 100644 pandasasssignments.ipynb create mode 100644 pandassolution.ipynb diff --git a/numpyassignments.ipynb b/numpyassignments.ipynb new file mode 100644 index 00000000..7c37985c --- /dev/null +++ b/numpyassignments.ipynb @@ -0,0 +1,89 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Module: NumPy Assignments\n", + "## Lesson: NumPy\n", + "### Assignment 1: Array Creation and Manipulation\n", + "\n", + "1. Create a NumPy array of shape (5, 5) filled with random integers between 1 and 20. Replace all the elements in the third column with 1.\n", + "2. Create a NumPy array of shape (4, 4) with values from 1 to 16. Replace the diagonal elements with 0.\n", + "\n", + "### Assignment 2: Array Indexing and Slicing\n", + "\n", + "1. Create a NumPy array of shape (6, 6) with values from 1 to 36. Extract the sub-array consisting of the 3rd to 5th rows and 2nd to 4th columns.\n", + "2. Create a NumPy array of shape (5, 5) with random integers. Extract the elements on the border.\n", + "\n", + "### Assignment 3: Array Operations\n", + "\n", + "1. Create two NumPy arrays of shape (3, 4) filled with random integers. Perform element-wise addition, subtraction, multiplication, and division.\n", + "2. Create a NumPy array of shape (4, 4) with values from 1 to 16. Compute the row-wise and column-wise sum.\n", + "\n", + "### Assignment 4: Statistical Operations\n", + "\n", + "1. Create a NumPy array of shape (5, 5) filled with random integers. Compute the mean, median, standard deviation, and variance of the array.\n", + "2. Create a NumPy array of shape (3, 3) with values from 1 to 9. Normalize the array (i.e., scale the values to have a mean of 0 and a standard deviation of 1).\n", + "\n", + "### Assignment 5: Broadcasting\n", + "\n", + "1. Create a NumPy array of shape (3, 3) filled with random integers. Add a 1D array of shape (3,) to each row of the 2D array using broadcasting.\n", + "2. Create a NumPy array of shape (4, 4) filled with random integers. Subtract a 1D array of shape (4,) from each column of the 2D array using broadcasting.\n", + "\n", + "### Assignment 6: Linear Algebra\n", + "\n", + "1. Create a NumPy array of shape (3, 3) representing a matrix. Compute its determinant, inverse, and eigenvalues.\n", + "2. Create two NumPy arrays of shape (2, 3) and (3, 2). Perform matrix multiplication on these arrays.\n", + "\n", + "### Assignment 7: Advanced Array Manipulation\n", + "\n", + "1. Create a NumPy array of shape (3, 3) with values from 1 to 9. Reshape the array to shape (1, 9) and then to shape (9, 1).\n", + "2. Create a NumPy array of shape (5, 5) filled with random integers. Flatten the array and then reshape it back to (5, 5).\n", + "\n", + "### Assignment 8: Fancy Indexing and Boolean Indexing\n", + "\n", + "1. Create a NumPy array of shape (5, 5) filled with random integers. Use fancy indexing to extract the elements at the corners of the array.\n", + "2. Create a NumPy array of shape (4, 4) filled with random integers. Use boolean indexing to set all elements greater than 10 to 10.\n", + "\n", + "### Assignment 9: Structured Arrays\n", + "\n", + "1. Create a structured array with fields 'name' (string), 'age' (integer), and 'weight' (float). Add some data and sort the array by age.\n", + "2. Create a structured array with fields 'x' and 'y' (both integers). Add some data and compute the Euclidean distance between each pair of points.\n", + "\n", + "### Assignment 10: Masked Arrays\n", + "\n", + "1. Create a masked array of shape (4, 4) with random integers and mask the elements greater than 10. Compute the sum of the unmasked elements.\n", + "2. Create a masked array of shape (3, 3) with random integers and mask the diagonal elements. Replace the masked elements with the mean of the unmasked elements." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/numpysolutions.ipynb b/numpysolutions.ipynb new file mode 100644 index 00000000..c35c31e2 --- /dev/null +++ b/numpysolutions.ipynb @@ -0,0 +1,592 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Module: NumPy Assignments\n", + "## Lesson: NumPy\n", + "### Assignment 1: Array Creation and Manipulation\n", + "\n", + "1. Create a NumPy array of shape (5, 5) filled with random integers between 1 and 20. Replace all the elements in the third column with 1." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "\n", + "# Create a NumPy array of shape (5, 5) filled with random integers\n", + "array = np.random.randint(1, 21, size=(5, 5))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Replace all the elements in the third column with 1\n", + "array[:, 2] = 1\n", + "print(\"Modified array:\")\n", + "print(array)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a NumPy array of shape (4, 4) with values from 1 to 16. Replace the diagonal elements with 0." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (4, 4) with values from 1 to 16\n", + "array = np.arange(1, 17).reshape((4, 4))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Replace the diagonal elements with 0\n", + "np.fill_diagonal(array, 0)\n", + "print(\"Modified array:\")\n", + "print(array)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 2: Array Indexing and Slicing\n", + "\n", + "1. Create a NumPy array of shape (6, 6) with values from 1 to 36. Extract the sub-array consisting of the 3rd to 5th rows and 2nd to 4th columns." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (6, 6) with values from 1 to 36\n", + "array = np.arange(1, 37).reshape((6, 6))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Extract the sub-array\n", + "sub_array = array[2:5, 1:4]\n", + "print(\"Sub-array:\")\n", + "print(sub_array)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a NumPy array of shape (5, 5) with random integers. Extract the elements on the border." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (5, 5) with random integers\n", + "array = np.random.randint(1, 21, size=(5, 5))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Extract the elements on the border\n", + "border_elements = np.concatenate((array[0, :], array[-1, :], array[1:-1, 0], array[1:-1, -1]))\n", + "print(\"Border elements:\")\n", + "print(border_elements)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 3: Array Operations\n", + "\n", + "1. Create two NumPy arrays of shape (3, 4) filled with random integers. Perform element-wise addition, subtraction, multiplication, and division." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create two NumPy arrays of shape (3, 4) filled with random integers\n", + "array1 = np.random.randint(1, 11, size=(3, 4))\n", + "array2 = np.random.randint(1, 11, size=(3, 4))\n", + "print(\"Array 1:\")\n", + "print(array1)\n", + "print(\"Array 2:\")\n", + "print(array2)\n", + "\n", + "# Perform element-wise operations\n", + "addition = array1 + array2\n", + "subtraction = array1 - array2\n", + "multiplication = array1 * array2\n", + "division = array1 / array2\n", + "\n", + "print(\"Element-wise addition:\")\n", + "print(addition)\n", + "print(\"Element-wise subtraction:\")\n", + "print(subtraction)\n", + "print(\"Element-wise multiplication:\")\n", + "print(multiplication)\n", + "print(\"Element-wise division:\")\n", + "print(division)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a NumPy array of shape (4, 4) with values from 1 to 16. Compute the row-wise and column-wise sum." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (4, 4) with values from 1 to 16\n", + "array = np.arange(1, 17).reshape((4, 4))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Compute the row-wise and column-wise sum\n", + "row_sum = np.sum(array, axis=1)\n", + "column_sum = np.sum(array, axis=0)\n", + "\n", + "print(\"Row-wise sum:\")\n", + "print(row_sum)\n", + "print(\"Column-wise sum:\")\n", + "print(column_sum)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 4: Statistical Operations\n", + "\n", + "1. Create a NumPy array of shape (5, 5) filled with random integers. Compute the mean, median, standard deviation, and variance of the array." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (5, 5) filled with random integers\n", + "array = np.random.randint(1, 21, size=(5, 5))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Compute the statistical values\n", + "mean = np.mean(array)\n", + "median = np.median(array)\n", + "std_dev = np.std(array)\n", + "variance = np.var(array)\n", + "\n", + "print(\"Mean:\", mean)\n", + "print(\"Median:\", median)\n", + "print(\"Standard Deviation:\", std_dev)\n", + "print(\"Variance:\", variance)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a NumPy array of shape (3, 3) with values from 1 to 9. Normalize the array (i.e., scale the values to have a mean of 0 and a standard deviation of 1)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (3, 3) with values from 1 to 9\n", + "array = np.arange(1, 10).reshape((3, 3))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Normalize the array\n", + "mean = np.mean(array)\n", + "std_dev = np.std(array)\n", + "normalized_array = (array - mean) / std_dev\n", + "\n", + "print(\"Normalized array:\")\n", + "print(normalized_array)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 5: Broadcasting\n", + "\n", + "1. Create a NumPy array of shape (3, 3) filled with random integers. Add a 1D array of shape (3,) to each row of the 2D array using broadcasting." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (3, 3) filled with random integers\n", + "array = np.random.randint(1, 11, size=(3, 3))\n", + "row_array = np.random.randint(1, 11, size=(3,))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "print(\"1D array:\")\n", + "print(row_array)\n", + "\n", + "# Add the 1D array to each row of the 2D array using broadcasting\n", + "result = array + row_array\n", + "print(\"Resulting array:\")\n", + "print(result)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a NumPy array of shape (4, 4) filled with random integers. Subtract a 1D array of shape (4,) from each column of the 2D array using broadcasting." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (4, 4) filled with random integers\n", + "array = np.random.randint(1, 11, size=(4, 4))\n", + "column_array = np.random.randint(1, 11, size=(4,))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "print(\"1D array:\")\n", + "print(column_array)\n", + "\n", + "# Subtract the 1D array from each column of the 2D array using broadcasting\n", + "result = array - column_array[:, np.newaxis]\n", + "print(\"Resulting array:\")\n", + "print(result)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 6: Linear Algebra\n", + "\n", + "1. Create a NumPy array of shape (3, 3) representing a matrix. Compute its determinant, inverse, and eigenvalues." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (3, 3) representing a matrix\n", + "matrix = np.random.randint(1, 11, size=(3, 3))\n", + "print(\"Original matrix:\")\n", + "print(matrix)\n", + "\n", + "# Compute the determinant\n", + "determinant = np.linalg.det(matrix)\n", + "print(\"Determinant:\", determinant)\n", + "\n", + "# Compute the inverse\n", + "inverse = np.linalg.inv(matrix)\n", + "print(\"Inverse:\")\n", + "print(inverse)\n", + "\n", + "# Compute the eigenvalues\n", + "eigenvalues = np.linalg.eigvals(matrix)\n", + "print(\"Eigenvalues:\", eigenvalues)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create two NumPy arrays of shape (2, 3) and (3, 2). Perform matrix multiplication on these arrays." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create two NumPy arrays of shape (2, 3) and (3, 2)\n", + "array1 = np.random.randint(1, 11, size=(2, 3))\n", + "array2 = np.random.randint(1, 11, size=(3, 2))\n", + "print(\"Array 1:\")\n", + "print(array1)\n", + "print(\"Array 2:\")\n", + "print(array2)\n", + "\n", + "# Perform matrix multiplication\n", + "result = np.dot(array1, array2)\n", + "print(\"Matrix multiplication result:\")\n", + "print(result)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 7: Advanced Array Manipulation\n", + "\n", + "1. Create a NumPy array of shape (3, 3) with values from 1 to 9. Reshape the array to shape (1, 9) and then to shape (9, 1)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (3, 3) with values from 1 to 9\n", + "array = np.arange(1, 10).reshape((3, 3))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Reshape the array to shape (1, 9)\n", + "reshaped_array_1 = array.reshape((1, 9))\n", + "print(\"Reshaped array (1, 9):\")\n", + "print(reshaped_array_1)\n", + "\n", + "# Reshape the array to shape (9, 1)\n", + "reshaped_array_2 = reshaped_array_1.reshape((9, 1))\n", + "print(\"Reshaped array (9, 1):\")\n", + "print(reshaped_array_2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a NumPy array of shape (5, 5) filled with random integers. Flatten the array and then reshape it back to (5, 5)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (5, 5) filled with random integers\n", + "array = np.random.randint(1, 21, size=(5, 5))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Flatten the array\n", + "flattened_array = array.flatten()\n", + "print(\"Flattened array:\")\n", + "print(flattened_array)\n", + "\n", + "# Reshape the array back to (5, 5)\n", + "reshaped_array = flattened_array.reshape((5, 5))\n", + "print(\"Reshaped array:\")\n", + "print(reshaped_array)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 8: Fancy Indexing and Boolean Indexing\n", + "\n", + "1. Create a NumPy array of shape (5, 5) filled with random integers. Use fancy indexing to extract the elements at the corners of the array." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (5, 5) filled with random integers\n", + "array = np.random.randint(1, 21, size=(5, 5))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Use fancy indexing to extract the elements at the corners of the array\n", + "corners = array[[0, 0, -1, -1], [0, -1, 0, -1]]\n", + "print(\"Corner elements:\")\n", + "print(corners)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a NumPy array of shape (4, 4) filled with random integers. Use boolean indexing to set all elements greater than 10 to 10." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a NumPy array of shape (4, 4) filled with random integers\n", + "array = np.random.randint(1, 21, size=(4, 4))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "\n", + "# Use boolean indexing to set all elements greater than 10 to 10\n", + "array[array > 10] = 10\n", + "print(\"Modified array:\")\n", + "print(array)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 9: Structured Arrays\n", + "\n", + "1. Create a structured array with fields 'name' (string), 'age' (integer), and 'weight' (float). Add some data and sort the array by age." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a structured array with fields 'name', 'age', and 'weight'\n", + "data_type = [('name', 'U10'), ('age', 'i4'), ('weight', 'f4')]\n", + "data = np.array([('Alice', 25, 55.5), ('Bob', 30, 85.3), ('Charlie', 20, 65.2)], dtype=data_type)\n", + "print(\"Original array:\")\n", + "print(data)\n", + "\n", + "# Sort the array by age\n", + "sorted_data = np.sort(data, order='age')\n", + "print(\"Sorted array by age:\")\n", + "print(sorted_data)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a structured array with fields 'x' and 'y' (both integers). Add some data and compute the Euclidean distance between each pair of points." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a structured array with fields 'x' and 'y'\n", + "data_type = [('x', 'i4'), ('y', 'i4')]\n", + "data = np.array([(1, 2), (3, 4), (5, 6)], dtype=data_type)\n", + "print(\"Original array:\")\n", + "print(data)\n", + "\n", + "# Compute the Euclidean distance between each pair of points\n", + "distances = np.sqrt((data['x'][:, np.newaxis] - data['x'])**2 + (data['y'][:, np.newaxis] - data['y'])**2)\n", + "print(\"Euclidean distances:\")\n", + "print(distances)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 10: Masked Arrays\n", + "\n", + "1. Create a masked array of shape (4, 4) with random integers and mask the elements greater than 10. Compute the sum of the unmasked elements." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy.ma as ma\n", + "\n", + "# Create a masked array of shape (4, 4) with random integers\n", + "array = np.random.randint(1, 21, size=(4, 4))\n", + "masked_array = ma.masked_greater(array, 10)\n", + "print(\"Original array:\")\n", + "print(array)\n", + "print(\"Masked array:\")\n", + "print(masked_array)\n", + "\n", + "# Compute the sum of the unmasked elements\n", + "sum_unmasked = masked_array.sum()\n", + "print(\"Sum of unmasked elements:\", sum_unmasked)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a masked array of shape (3, 3) with random integers and mask the diagonal elements. Replace the masked elements with the mean of the unmasked elements." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a masked array of shape (3, 3) with random integers\n", + "array = np.random.randint(1, 21, size=(3, 3))\n", + "masked_array = ma.masked_array(array, mask=np.eye(3, dtype=bool))\n", + "print(\"Original array:\")\n", + "print(array)\n", + "print(\"Masked array:\")\n", + "print(masked_array)\n", + "\n", + "# Replace the masked elements with the mean of the unmasked elements\n", + "mean_unmasked = masked_array.mean()\n", + "masked_array = masked_array.filled(mean_unmasked)\n", + "print(\"Modified masked array:\")\n", + "print(masked_array)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/pandasasssignments.ipynb b/pandasasssignments.ipynb new file mode 100644 index 00000000..797b508a --- /dev/null +++ b/pandasasssignments.ipynb @@ -0,0 +1,89 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Module: Pandas Assignments\n", + "## Lesson: Pandas\n", + "### Assignment 1: DataFrame Creation and Indexing\n", + "\n", + "1. Create a Pandas DataFrame with 4 columns and 6 rows filled with random integers. Set the index to be the first column.\n", + "2. Create a Pandas DataFrame with columns 'A', 'B', 'C' and index 'X', 'Y', 'Z'. Fill the DataFrame with random integers and access the element at row 'Y' and column 'B'.\n", + "\n", + "### Assignment 2: DataFrame Operations\n", + "\n", + "1. Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers. Add a new column that is the product of the first two columns.\n", + "2. Create a Pandas DataFrame with 3 columns and 4 rows filled with random integers. Compute the row-wise and column-wise sum.\n", + "\n", + "### Assignment 3: Data Cleaning\n", + "\n", + "1. Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers. Introduce some NaN values. Fill the NaN values with the mean of the respective columns.\n", + "2. Create a Pandas DataFrame with 4 columns and 6 rows filled with random integers. Introduce some NaN values. Drop the rows with any NaN values.\n", + "\n", + "### Assignment 4: Data Aggregation\n", + "\n", + "1. Create a Pandas DataFrame with 2 columns: 'Category' and 'Value'. Fill the 'Category' column with random categories ('A', 'B', 'C') and the 'Value' column with random integers. Group the DataFrame by 'Category' and compute the sum and mean of 'Value' for each category.\n", + "2. Create a Pandas DataFrame with 3 columns: 'Product', 'Category', and 'Sales'. Fill the DataFrame with random data. Group the DataFrame by 'Category' and compute the total sales for each category.\n", + "\n", + "### Assignment 5: Merging DataFrames\n", + "\n", + "1. Create two Pandas DataFrames with a common column. Merge the DataFrames using the common column.\n", + "2. Create two Pandas DataFrames with different columns. Concatenate the DataFrames along the rows and along the columns.\n", + "\n", + "### Assignment 6: Time Series Analysis\n", + "\n", + "1. Create a Pandas DataFrame with a datetime index and one column filled with random integers. Resample the DataFrame to compute the monthly mean of the values.\n", + "2. Create a Pandas DataFrame with a datetime index ranging from '2021-01-01' to '2021-12-31' and one column filled with random integers. Compute the rolling mean with a window of 7 days.\n", + "\n", + "### Assignment 7: MultiIndex DataFrame\n", + "\n", + "1. Create a Pandas DataFrame with a MultiIndex (hierarchical index). Perform some basic indexing and slicing operations on the MultiIndex DataFrame.\n", + "2. Create a Pandas DataFrame with MultiIndex consisting of 'Category' and 'SubCategory'. Fill the DataFrame with random data and compute the sum of values for each 'Category' and 'SubCategory'.\n", + "\n", + "### Assignment 8: Pivot Tables\n", + "\n", + "1. Create a Pandas DataFrame with columns 'Date', 'Category', and 'Value'. Create a pivot table to compute the sum of 'Value' for each 'Category' by 'Date'.\n", + "2. Create a Pandas DataFrame with columns 'Year', 'Quarter', and 'Revenue'. Create a pivot table to compute the mean 'Revenue' for each 'Quarter' by 'Year'.\n", + "\n", + "### Assignment 9: Applying Functions\n", + "\n", + "1. Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers. Apply a function that doubles the values of the DataFrame.\n", + "2. Create a Pandas DataFrame with 3 columns and 6 rows filled with random integers. Apply a lambda function to create a new column that is the sum of the existing columns.\n", + "\n", + "### Assignment 10: Working with Text Data\n", + "\n", + "1. Create a Pandas Series with 5 random text strings. Convert all the strings to uppercase.\n", + "2. Create a Pandas Series with 5 random text strings. Extract the first three characters of each string.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/pandassolution.ipynb b/pandassolution.ipynb new file mode 100644 index 00000000..b56a7b6f --- /dev/null +++ b/pandassolution.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Module: Pandas Assignments\n", + "## Lesson: Pandas\n", + "### Assignment 1: DataFrame Creation and Indexing\n", + "\n", + "1. Create a Pandas DataFrame with 4 columns and 6 rows filled with random integers. Set the index to be the first column." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "\n", + "# Create a Pandas DataFrame with 4 columns and 6 rows filled with random integers\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(6, 4)), columns=['A', 'B', 'C', 'D'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Set the index to be the first column\n", + "df.set_index('A', inplace=True)\n", + "print(\"DataFrame with new index:\")\n", + "print(df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with columns 'A', 'B', 'C' and index 'X', 'Y', 'Z'. Fill the DataFrame with random integers and access the element at row 'Y' and column 'B'." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with specified columns and index\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(3, 3)), columns=['A', 'B', 'C'], index=['X', 'Y', 'Z'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Access the element at row 'Y' and column 'B'\n", + "element = df.at['Y', 'B']\n", + "print(\"Element at row 'Y' and column 'B':\", element)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 2: DataFrame Operations\n", + "\n", + "1. Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers. Add a new column that is the product of the first two columns." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(5, 3)), columns=['A', 'B', 'C'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Add a new column that is the product of the first two columns\n", + "df['D'] = df['A'] * df['B']\n", + "print(\"DataFrame with new column:\")\n", + "print(df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with 3 columns and 4 rows filled with random integers. Compute the row-wise and column-wise sum." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 3 columns and 4 rows filled with random integers\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(4, 3)), columns=['A', 'B', 'C'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Compute the row-wise and column-wise sum\n", + "row_sum = df.sum(axis=1)\n", + "column_sum = df.sum(axis=0)\n", + "\n", + "print(\"Row-wise sum:\")\n", + "print(row_sum)\n", + "print(\"Column-wise sum:\")\n", + "print(column_sum)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 3: Data Cleaning\n", + "\n", + "1. Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers. Introduce some NaN values. Fill the NaN values with the mean of the respective columns." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(5, 3)), columns=['A', 'B', 'C'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Introduce some NaN values\n", + "df.iloc[0, 1] = np.nan\n", + "df.iloc[2, 2] = np.nan\n", + "df.iloc[4, 0] = np.nan\n", + "print(\"DataFrame with NaN values:\")\n", + "print(df)\n", + "\n", + "# Fill the NaN values with the mean of the respective columns\n", + "df.fillna(df.mean(), inplace=True)\n", + "print(\"DataFrame with NaN values filled:\")\n", + "print(df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with 4 columns and 6 rows filled with random integers. Introduce some NaN values. Drop the rows with any NaN values." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 4 columns and 6 rows filled with random integers\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(6, 4)), columns=['A', 'B', 'C', 'D'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Introduce some NaN values\n", + "df.iloc[1, 2] = np.nan\n", + "df.iloc[3, 0] = np.nan\n", + "df.iloc[5, 1] = np.nan\n", + "print(\"DataFrame with NaN values:\")\n", + "print(df)\n", + "\n", + "# Drop the rows with any NaN values\n", + "df.dropna(inplace=True)\n", + "print(\"DataFrame with NaN values dropped:\")\n", + "print(df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 4: Data Aggregation\n", + "\n", + "1. Create a Pandas DataFrame with 2 columns: 'Category' and 'Value'. Fill the 'Category' column with random categories ('A', 'B', 'C') and the 'Value' column with random integers. Group the DataFrame by 'Category' and compute the sum and mean of 'Value' for each category." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 2 columns: 'Category' and 'Value'\n", + "df = pd.DataFrame({'Category': np.random.choice(['A', 'B', 'C'], size=10), 'Value': np.random.randint(1, 100, size=10)})\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Group the DataFrame by 'Category' and compute the sum and mean of 'Value' for each category\n", + "grouped = df.groupby('Category')['Value'].agg(['sum', 'mean'])\n", + "print(\"Grouped DataFrame:\")\n", + "print(grouped)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with 3 columns: 'Product', 'Category', and 'Sales'. Fill the DataFrame with random data. Group the DataFrame by 'Category' and compute the total sales for each category." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 3 columns: 'Product', 'Category', and 'Sales'\n", + "df = pd.DataFrame({'Product': np.random.choice(['Prod1', 'Prod2', 'Prod3'], size=10), 'Category': np.random.choice(['A', 'B', 'C'], size=10), 'Sales': np.random.randint(1, 100, size=10)})\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Group the DataFrame by 'Category' and compute the total sales for each category\n", + "grouped = df.groupby('Category')['Sales'].sum()\n", + "print(\"Grouped DataFrame:\")\n", + "print(grouped)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 5: Merging DataFrames\n", + "\n", + "1. Create two Pandas DataFrames with a common column. Merge the DataFrames using the common column." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create two Pandas DataFrames with a common column\n", + "df1 = pd.DataFrame({'Key': ['A', 'B', 'C', 'D'], 'Value1': np.random.randint(1, 100, size=4)})\n", + "df2 = pd.DataFrame({'Key': ['A', 'B', 'C', 'E'], 'Value2': np.random.randint(1, 100, size=4)})\n", + "print(\"DataFrame 1:\")\n", + "print(df1)\n", + "print(\"DataFrame 2:\")\n", + "print(df2)\n", + "\n", + "# Merge the DataFrames using the common column\n", + "merged = pd.merge(df1, df2, on='Key')\n", + "print(\"Merged DataFrame:\")\n", + "print(merged)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create two Pandas DataFrames with different columns. Concatenate the DataFrames along the rows and along the columns." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create two Pandas DataFrames with different columns\n", + "df1 = pd.DataFrame({'A': np.random.randint(1, 100, size=3), 'B': np.random.randint(1, 100, size=3)})\n", + "df2 = pd.DataFrame({'C': np.random.randint(1, 100, size=3), 'D': np.random.randint(1, 100, size=3)})\n", + "print(\"DataFrame 1:\")\n", + "print(df1)\n", + "print(\"DataFrame 2:\")\n", + "print(df2)\n", + "\n", + "# Concatenate the DataFrames along the rows\n", + "concat_rows = pd.concat([df1, df2], axis=0)\n", + "print(\"Concatenated DataFrame (rows):\")\n", + "print(concat_rows)\n", + "\n", + "# Concatenate the DataFrames along the columns\n", + "concat_columns = pd.concat([df1, df2], axis=1)\n", + "print(\"Concatenated DataFrame (columns):\")\n", + "print(concat_columns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 6: Time Series Analysis\n", + "\n", + "1. Create a Pandas DataFrame with a datetime index and one column filled with random integers. Resample the DataFrame to compute the monthly mean of the values." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with a datetime index and one column filled with random integers\n", + "date_rng = pd.date_range(start='2022-01-01', end='2022-12-31', freq='D')\n", + "df = pd.DataFrame(date_rng, columns=['date'])\n", + "df['data'] = np.random.randint(0, 100, size=(len(date_rng)))\n", + "df.set_index('date', inplace=True)\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Resample the DataFrame to compute the monthly mean of the values\n", + "monthly_mean = df.resample('M').mean()\n", + "print(\"Monthly mean DataFrame:\")\n", + "print(monthly_mean)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with a datetime index ranging from '2021-01-01' to '2021-12-31' and one column filled with random integers. Compute the rolling mean with a window of 7 days." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with a datetime index ranging from '2021-01-01' to '2021-12-31'\n", + "date_rng = pd.date_range(start='2021-01-01', end='2021-12-31', freq='D')\n", + "df = pd.DataFrame(date_rng, columns=['date'])\n", + "df['data'] = np.random.randint(0, 100, size=(len(date_rng)))\n", + "df.set_index('date', inplace=True)\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Compute the rolling mean with a window of 7 days\n", + "rolling_mean = df.rolling(window=7).mean()\n", + "print(\"Rolling mean DataFrame:\")\n", + "print(rolling_mean)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 7: MultiIndex DataFrame\n", + "\n", + "1. Create a Pandas DataFrame with a MultiIndex (hierarchical index). Perform some basic indexing and slicing operations on the MultiIndex DataFrame." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with a MultiIndex (hierarchical index)\n", + "arrays = [['A', 'A', 'B', 'B'], ['one', 'two', 'one', 'two']]\n", + "index = pd.MultiIndex.from_arrays(arrays, names=('Category', 'SubCategory'))\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(4, 3)), index=index, columns=['Value1', 'Value2', 'Value3'])\n", + "print(\"MultiIndex DataFrame:\")\n", + "print(df)\n", + "\n", + "# Basic indexing and slicing operations\n", + "print(\"Indexing at Category 'A':\")\n", + "print(df.loc['A'])\n", + "\n", + "print(\"Slicing at Category 'B' and SubCategory 'two':\")\n", + "print(df.loc[('B', 'two')])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with MultiIndex consisting of 'Category' and 'SubCategory'. Fill the DataFrame with random data and compute the sum of values for each 'Category' and 'SubCategory'." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with MultiIndex consisting of 'Category' and 'SubCategory'\n", + "arrays = [['A', 'A', 'B', 'B', 'C', 'C'], ['one', 'two', 'one', 'two', 'one', 'two']]\n", + "index = pd.MultiIndex.from_arrays(arrays, names=('Category', 'SubCategory'))\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(6, 3)), index=index, columns=['Value1', 'Value2', 'Value3'])\n", + "print(\"MultiIndex DataFrame:\")\n", + "print(df)\n", + "\n", + "# Compute the sum of values for each 'Category' and 'SubCategory'\n", + "sum_values = df.groupby(['Category', 'SubCategory']).sum()\n", + "print(\"Sum of values:\")\n", + "print(sum_values)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 8: Pivot Tables\n", + "\n", + "1. Create a Pandas DataFrame with columns 'Date', 'Category', and 'Value'. Create a pivot table to compute the sum of 'Value' for each 'Category' by 'Date'." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with columns 'Date', 'Category', and 'Value'\n", + "date_rng = pd.date_range(start='2022-01-01', end='2022-01-10', freq='D')\n", + "df = pd.DataFrame({'Date': np.random.choice(date_rng, size=20), 'Category': np.random.choice(['A', 'B', 'C'], size=20), 'Value': np.random.randint(1, 100, size=20)})\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Create a pivot table to compute the sum of 'Value' for each 'Category' by 'Date'\n", + "pivot_table = df.pivot_table(values='Value', index='Date', columns='Category', aggfunc='sum')\n", + "print(\"Pivot Table:\")\n", + "print(pivot_table)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with columns 'Year', 'Quarter', and 'Revenue'. Create a pivot table to compute the mean 'Revenue' for each 'Quarter' by 'Year'." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with columns 'Year', 'Quarter', and 'Revenue'\n", + "df = pd.DataFrame({'Year': np.random.choice([2020, 2021, 2022], size=12), 'Quarter': np.random.choice(['Q1', 'Q2', 'Q3', 'Q4'], size=12), 'Revenue': np.random.randint(1, 1000, size=12)})\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Create a pivot table to compute the mean 'Revenue' for each 'Quarter' by 'Year'\n", + "pivot_table = df.pivot_table(values='Revenue', index='Year', columns='Quarter', aggfunc='mean')\n", + "print(\"Pivot Table:\")\n", + "print(pivot_table)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 9: Applying Functions\n", + "\n", + "1. Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers. Apply a function that doubles the values of the DataFrame." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 3 columns and 5 rows filled with random integers\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(5, 3)), columns=['A', 'B', 'C'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Apply a function that doubles the values of the DataFrame\n", + "df_doubled = df.applymap(lambda x: x * 2)\n", + "print(\"Doubled DataFrame:\")\n", + "print(df_doubled)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas DataFrame with 3 columns and 6 rows filled with random integers. Apply a lambda function to create a new column that is the sum of the existing columns." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas DataFrame with 3 columns and 6 rows filled with random integers\n", + "df = pd.DataFrame(np.random.randint(1, 100, size=(6, 3)), columns=['A', 'B', 'C'])\n", + "print(\"Original DataFrame:\")\n", + "print(df)\n", + "\n", + "# Apply a lambda function to create a new column that is the sum of the existing columns\n", + "df['Sum'] = df.apply(lambda row: row.sum(), axis=1)\n", + "print(\"DataFrame with Sum column:\")\n", + "print(df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Assignment 10: Working with Text Data\n", + "\n", + "1. Create a Pandas Series with 5 random text strings. Convert all the strings to uppercase." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas Series with 5 random text strings\n", + "text_data = pd.Series(['apple', 'banana', 'cherry', 'date', 'elderberry'])\n", + "print(\"Original Series:\")\n", + "print(text_data)\n", + "\n", + "# Convert all the strings to uppercase\n", + "uppercase_data = text_data.str.upper()\n", + "print(\"Uppercase Series:\")\n", + "print(uppercase_data)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "2. Create a Pandas Series with 5 random text strings. Extract the first three characters of each string." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a Pandas Series with 5 random text strings\n", + "text_data = pd.Series(['apple', 'banana', 'cherry', 'date', 'elderberry'])\n", + "print(\"Original Series:\")\n", + "print(text_data)\n", + "\n", + "# Extract the first three characters of each string\n", + "first_three_chars = text_data.str[:3]\n", + "print(\"First three characters:\")\n", + "print(first_three_chars)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}