Python Assignment 4
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "* __INSTRUCTIONS:__\n", "\n", "\n", " * Add your code as indicated in each cell.\n", "\n", "\n", " * Besides adding your code, do not alter this file.\n", "\n", "\n", " * Do not delete or change test cases. Once you are done with a question, you can run the test cases to see if you programmed the question correctly.\n", "\n", "\n", " * If you get a question wrong, do not give up. Keep trying until you pass the test cases.\n", "\n", "\n", " * Rename the file as firstname_lastname_assignmentid.ipynb (e.g., marina_johnson_assignment1.ipynb)\n", "\n", "\n", " * Only submit .ipynb files (no .py files)" ] }, { "cell_type": "code", "execution_count": 138, "metadata": {}, "outputs": [], "source": [ "# Do not delete this cell\n", "import numpy as np\n", "score = dict()\n", "np.random.seed(333)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 1\n", "\n", "1. Read the employee_attrition dataset and save it as df. Recall that the target variable in this dataset is named __'Attrition.'__\n", "\n", "\n", "2. Check if the dataset is imbalanced by counting the number of Noes and Yeses in the target variable __Attrition.__\n", "\n", " * __Hints:__\n", " * Imbalanced data refers to a situation where the number of observations is not the same for all the classes in a dataset. For example, the number of churned employees is 4000, while the number of unchurned employees is 40000. This means this dataset is imbalanced. \n", " \n", " * You need to access the target variable __Attrition__ and count how many Yes and No there is in this variable. If the number of Yes's is equal to the number of No's, then the dataset is balanced. Otherwise, it is not balanced. \n", " \n", " * Check __Module 5g: Encoding Categorical Variables__ to earn more about data imbalance problems. Particularly, check 2.5: Balancing datasets in Module 5. " ] }, { "cell_type": "code", "execution_count": 139, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "df = # your code to read the dataset goes in here\n", "\n", "number_of_yes = # your code to find the number \n", " # of yeses in the Attrition variable goes in here\n", " \n", "number_of_no = # your code to find the number \n", " # of noes in the Attrition variable goes in here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 1" ] }, { "cell_type": "code", "execution_count": 140, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass'}" ] }, "execution_count": 140, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if (number_of_yes == 237 and number_of_no == 1233):\n", " score['question 1'] = 'pass'\n", " else: \n", " score['question 1'] = 'fail'\n", "except:\n", " score['question 1'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 2\n", "1. Identify the names of the __numerical input variables__ and save it as a __LIST__\n", "\n", "\n", "2. Identify the names of the __categorical input variables+__ and save it as a __LIST__\n", "\n", " * __Hints__:\n", " * Remember __Attrition__ is the __target (output)__ variable, so exclude __Attrition__ from both LISTS containing the numerical and categorical __input__ variables.\n", " * Check __Modules 5b: Dropping Variables__ and __Module 3e: Helpful Functions (check after minute 4)__" ] }, { "cell_type": "code", "execution_count": 141, "metadata": {}, "outputs": [], "source": [ "numerical_variables = # Your code to identify numerical variables goes in here\n", "categorical_varables = # Your code to identify categorical variables goes in here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 2" ] }, { "cell_type": "code", "execution_count": 142, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass', 'question 2': 'pass'}" ] }, "execution_count": 142, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if ((sorted(numerical_variables) == ['Age','DailyRate','DistanceFromHome','Education',\n", " 'EmployeeCount','EmployeeNumber','EnvironmentSatisfaction',\n", " 'HourlyRate','JobInvolvement','JobLevel','JobSatisfaction',\n", " 'MonthlyIncome','MonthlyRate','NumCompaniesWorked','PercentSalaryHike',\n", " 'PerformanceRating','RelationshipSatisfaction','StandardHours',\n", " 'StockOptionLevel','TotalWorkingYears','TrainingTimesLastYear',\n", " 'WorkLifeBalance','YearsAtCompany','YearsInCurrentRole',\n", " 'YearsSinceLastPromotion','YearsWithCurrManager']) and \n", " (sorted(categorical_varables) == ['BusinessTravel','Department','EducationField','Gender',\n", " 'JobRole','MaritalStatus','Over18','OverTime'])):\n", " \n", " score['question 2'] = 'pass'\n", " else: \n", " score['question 2'] = 'fail'\n", "except:\n", " score['question 2'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 3\n", "1. Identify the numerical variables with zero variance (i.e., zero standard deviation) and save them in a LIST\n", "\n", "\n", "2. Drop these numerical variables with zero variance (i.e., zero standard deviation) from the dataset df. The dataset df should not have these variables going forward. \n", "\n", " * __Hints:__\n", " * For each numerical variable, compute the standard deviation. If the standard deviation is zero, delete (i.e., drop) that variable from the dataset df. \n", " * Check __Modules 5b: Dropping Variables__" ] }, { "cell_type": "code", "execution_count": 143, "metadata": {}, "outputs": [], "source": [ "zero_variance_numerical_variables = # your code to find the \n", " # numerical variables with zero variance goes in here\n", " \n", "df = # your code to drop the zero variance numerical variables goes in here " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 3" ] }, { "cell_type": "code", "execution_count": 144, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass', 'question 2': 'pass', 'question 3': 'pass'}" ] }, "execution_count": 144, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if (zero_variance_numerical_variables == ['EmployeeCount', 'StandardHours']):\n", " score['question 3'] = 'pass'\n", " else: \n", " score['question 3'] = 'fail'\n", "except:\n", " score['question 3'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 4\n", "1. Identify the categorical variables with zero variance (i.e., low cardinality) and save them in a LIST\n", "\n", "\n", "2. Drop these categorical variables with zero variance (i.e., low cardinality) from the dataset df. The dataset df should not have these variables going forward. \n", "\n", " * __Hints:__\n", " * For each categorical variable, find the number of levels. If the number of levels is 1, delete (i.e., drop) that variable from the dataset df. For example, if a variable named occupation has only \"Engineers\" across all the rows (i.e., one level), the variable does not contain any information. In other words, zero variation. \n", " \n", " * Check __Modules 5b: Dropping Variables__" ] }, { "cell_type": "code", "execution_count": 145, "metadata": {}, "outputs": [], "source": [ "zero_variance_categorical_variables = [] # your code to find the \n", " # categorical variables with zero variance goes in here\n", " \n", "df = # your code to drop the zero variance\n", " # categorical variables goes in here " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 4" ] }, { "cell_type": "code", "execution_count": 146, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass'}" ] }, "execution_count": 146, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if (zero_variance_categorical_variables == ['Over18']):\n", " score['question 4'] = 'pass'\n", " else: \n", " score['question 4'] = 'fail'\n", "except:\n", " score['question 4'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 5\n", "1. Find the categorical variables with very high variance (i.e., very high cardinality) and save them in a LIST. Use 200 as the threshold. In other words, the categorical variables over 200 levels should be considered as variables with high cardinality (i.e., with high variance). \n", "\n", "\n", "2. Drop the categorical variables with very high variance (i.e., very high cardinality) from the dataset df. The dataset df should not have these variables going forward. \n", "\n", " * __Hints:__\n", " * For each categorical variable, find the number of levels. If the number of levels is greater than 200, delete (i.e., drop) that variable from the dataset df. For example, \n", " * Check __Modules 5b: Dropping Variables__" ] }, { "cell_type": "code", "execution_count": 147, "metadata": {}, "outputs": [], "source": [ "high_cardinality_categorical_variables = [] # your code to find the \n", " # categorical variables with high variance (i.e., cardinality) goes in here\n", "\n", "df = # your code to drop the high cardinality\n", " # categorical variables goes in here " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 5" ] }, { "cell_type": "code", "execution_count": 148, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass'}" ] }, "execution_count": 148, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if (high_cardinality_categorical_variables == []):\n", " score['question 5'] = 'pass'\n", " else: \n", " score['question 5'] = 'fail'\n", "except:\n", " score['question 5'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 6" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Scale (i.e., standardize) the numerical variables in the dataset using the standardization method and drop the original numerical variables and only keep the standardized ones. \n", "\n", "2. The new standardized numerical variables should have the same variable names. For example, the age variable after being standardized should be named the same (i.e., age)\n", "\n", " * __Hints__:\n", " * Feature standardization makes the values of each feature in the data have zero-mean (when subtracting the mean in the numerator) and unit-variance. This method is widely used for normalization in many machine learning algorithms.\n", " * Check __M5d: Standardization__" ] }, { "cell_type": "code", "execution_count": 149, "metadata": {}, "outputs": [], "source": [ "# your code to standardize numerical variables goes in here\n", "\n", "df = " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 6" ] }, { "cell_type": "code", "execution_count": 150, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass',\n", " 'question 6': 'pass'}" ] }, "execution_count": 150, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if ((df['Age'].max() == 2.526885578888087) and (df['DailyRate'].max() == 1.7267301192801021)):\n", " score['question 6'] = 'pass'\n", " else: \n", " score['question 6'] = 'fail'\n", "except:\n", " score['question 6'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 7\n", "1. Encode the categorical input variables. Do not encode the target variable __Attrition.__ You will do that in the following question.\n", "\n", " * __Hints:__\n", " * You will create dummies for categorical variables. \n", " * Example: Let's say you have a variable named occupation. This variable has three levels: Engineer, Teacher, Manager. We will use binary encoding and create dummies for each of these levels to be able to encode the occupation variable. \n", " * Technically, we are converting the categorical variable into new numerical variables.\n", " * We will have two new variables for this occupation variable, such as occupation_teacher, occupation_manager. We do not need occupation_teacher because we can infer if the person is a teacher by checking occupation_manager and occupation_engineer variables. \n", " * For example: If occupation_enginner and occupation_manager are zero, then this person is a teacher. \n", " * If occupation_engineer is 1, this person is an engineer.\n", " * Check __Module 5g: Encoding Categorical Variables__" ] }, { "cell_type": "code", "execution_count": 151, "metadata": {}, "outputs": [], "source": [ "# your code to encode categorical input variables goes in here\n", "\n", "df = " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 7" ] }, { "cell_type": "code", "execution_count": 152, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass',\n", " 'question 6': 'pass',\n", " 'question 7': 'pass'}" ] }, "execution_count": 152, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if ((df['JobRole_Laboratory Technician'].mean() == 0.1761904761904762) and \n", " (df['EducationField_Marketing'].mean() == 0.10816326530612246)):\n", " score['question 7'] = 'pass'\n", " else: \n", " score['question 7'] = 'fail'\n", "except:\n", " score['question 7'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 8\n", "1. Encode the categorical output variable: Attrition. Yes should be coded as 1, and No should be coded as 0. The new encoded target variable should be named as Attrition. Do not forget to drop the categorical Attirion Variable. Basically, you will convert the categorical Attrition variable into numerical attrition variable such that Yes will be mapped to 1, and No will be mapped to zero. \n", "\n", " * __Hints__:\n", " * Check Module 3 and Module 5 videos.\n" ] }, { "cell_type": "code", "execution_count": 153, "metadata": {}, "outputs": [], "source": [ "# your code to encode categorical output variables Attrition goes in here\n", "\n", "df = " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 8" ] }, { "cell_type": "code", "execution_count": 154, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass',\n", " 'question 6': 'pass',\n", " 'question 7': 'pass',\n", " 'question 8': 'pass'}" ] }, "execution_count": 154, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if (df['Attrition'].mean() == 0.16122448979591836):\n", " score['question 8'] = 'pass'\n", " else: \n", " score['question 8'] = 'fail'\n", "except:\n", " score['question 8'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 9" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Balance the dataset\n", "\n", "\n", "2. Your code should return the input and output variables __seperately__. The input variables will be saved as a dataframe named X. The output variable will be saved as a dataframe named y. \n", "\n", " * __Hints:__\n", " * Imbalanced data refers to a situation where the number of observations is not the same for all the classes in a dataset. For example, the number of churned employees is 4000, while the number of unchurned employees is 40000. This means this dataset is imbalanced. \n", " * You need to access the target variable __Attrition__ and increase the number of ones (i.e., Yeses) so that both the number of zeros (i.e., Noes) and the number of ones (i.e., Yeses) will be equal. \n", " * Check __M5g: Encoding Categorical Variables.__ balancing dataset is discussed in this video. " ] }, { "cell_type": "code", "execution_count": 156, "metadata": {}, "outputs": [], "source": [ "# Your code to balance the dataset goes in here\n", "X = # dataframe containing the input variables after balancing\n", "y = # dataframe containing the output variable Attrition after balancing" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 9" ] }, { "cell_type": "code", "execution_count": 157, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass',\n", " 'question 6': 'pass',\n", " 'question 7': 'pass',\n", " 'question 8': 'pass',\n", " 'question 9': 'pass'}" ] }, "execution_count": 157, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if ((y.Attrition.value_counts()[0] == 1233) and (y.Attrition.value_counts()[1] == 1233)):\n", " score['question 9'] = 'pass'\n", " else: \n", " score['question 9'] = 'fail'\n", "except:\n", " score['question 9'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 10" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* __Split the dataset into training and testing__ Basically using X and y dataframes, you will create X_train, X_test, y_train, and y_test. \n", " * You need to keep 70% of the dataset for training and 30% for testing.\n", " \n", " * __Hints__:\n", " * You can use the train_test_split function in sklearn library\n", " * Check Module __M6c: Classification__" ] }, { "cell_type": "code", "execution_count": 158, "metadata": {}, "outputs": [], "source": [ "# your code to create train and test sets goes in here\n", "\n", "X_train, X_test, y_train, y_test = # your code to create train and test sets goes in here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 6" ] }, { "cell_type": "code", "execution_count": 159, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass',\n", " 'question 6': 'pass',\n", " 'question 7': 'pass',\n", " 'question 8': 'pass',\n", " 'question 9': 'pass',\n", " 'question 10': 'pass'}" ] }, "execution_count": 159, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if ((X_train.shape[0]<1750) and (X_train.shape[0]>1700)):\n", " score['question 10'] = 'pass'\n", " else: \n", " score['question 10'] = 'fail'\n", "except:\n", " score['question 10'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 11" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Train a knn model where k is 3 using the training dataset.\n", "\n", "\n", "2. Make predictions using the test dataset\n", "\n", "\n", "3. Compute accuracy and save as accuracy\n", "\n", " * __Hints:__\n", " * You need to use the KNeighborsClassifier function. Instantiate a knn object and pass the number of neighbors to the function. Train the model using the X_train and y_train. Then make predictions using X_test. Then compute the accuracy using the predicted values and y_test.\n", " * Check __Module 6d: Model Performance__ and __Module 5c: Classification_" ] }, { "cell_type": "code", "execution_count": 160, "metadata": {}, "outputs": [], "source": [ "# Your code to train knn, make predictions, and compute accuracy goes in here\n", "\n", "accuracy = # compute accuracy here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 11" ] }, { "cell_type": "code", "execution_count": 161, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass',\n", " 'question 6': 'pass',\n", " 'question 7': 'pass',\n", " 'question 8': 'pass',\n", " 'question 9': 'pass',\n", " 'question 10': 'pass',\n", " 'question 11': 'pass'}" ] }, "execution_count": 161, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if ((accuracy<.80) and (accuracy>.74)):\n", " score['question 11'] = 'pass'\n", " else: \n", " score['question 11'] = 'fail'\n", "except:\n", " score['question 11'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Question 12" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Train a Random Forests model where the number of estimators is 100 using the training dataset.\n", "\n", "\n", "2. Make predictions using the test dataset\n", "\n", "\n", "3. Compute accuracy and save as accuracy\n", "\n", " * __Hints:__\n", " * You need to use the RandomForestClassifier function. Instantiate a RandomForestClassifier object and pass the number of estimators to the function. Train the model using the X_train and y_train. Then make predictions using X_test. Then compute the accuracy using the predicted values and y_test.\n", " * Check __Module 6d: Model Performance__ and __Module 5c: Classification_" ] }, { "cell_type": "code", "execution_count": 162, "metadata": {}, "outputs": [], "source": [ "# Your code to train random forest, make predictions, and compute accuracy goes in here\n", "\n", "accuracy = # compute accuracy here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do not alter the below cell. It is a test case for Question 6" ] }, { "cell_type": "code", "execution_count": 163, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'question 1': 'pass',\n", " 'question 2': 'pass',\n", " 'question 3': 'pass',\n", " 'question 4': 'pass',\n", " 'question 5': 'pass',\n", " 'question 6': 'pass',\n", " 'question 7': 'pass',\n", " 'question 8': 'pass',\n", " 'question 9': 'pass',\n", " 'question 10': 'pass',\n", " 'question 11': 'pass',\n", " 'question 12': 'pass'}" ] }, "execution_count": 163, "metadata": {}, "output_type": "execute_result" } ], "source": [ "try:\n", " if ((accuracy<.95) and (accuracy>.90)):\n", " score['question 12'] = 'pass'\n", " else: \n", " score['question 12'] = 'fail'\n", "except:\n", " score['question 12'] = 'fail'\n", "score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###################################################################################################################" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Your Grade" ] }, { "cell_type": "code", "execution_count": 164, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Your overall score is: 100\n" ] } ], "source": [ "print('Your overall score is: ', round(list(score.values()).count('pass')*8.3333))" ] } ], "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.7.3" }, "toc": { "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "toc_cell": false, "toc_position": {}, "toc_section_display": "block", "toc_window_display": false }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }