{ "cells": [ { "cell_type": "markdown", "id": "42ffe538-0da7-4ab8-9bb2-efce0add67a9", "metadata": {}, "source": [ "WESTROXBURY EXAMPLE" ] }, { "cell_type": "markdown", "id": "ea268c67-637e-42e1-adee-cf6a86d5db0f", "metadata": {}, "source": [ "The data in Westroxbury.csv includes information on a single owner-occupied homes in West Roxbury, a neighborhood in southwest Boston MA, in 2014." ] }, { "cell_type": "code", "execution_count": 2, "id": "cc9e94f2-60e2-4a36-a7f8-1ec000501586", "metadata": {}, "outputs": [], "source": [ "# Learning objectives:\n", "# 1) Learn how to load datasets into a Pandas DataFrame and inspect the structure\n", "# 2) Apply column renaming techniques and clean variable names to improve data manipulation using dot notation.\n", "# 3) Understand how to convert columns to appropriate data types, such as continuous, discrete, and categorical variables.\n", "# 4) Practice selecting subsets of data using loc[], iloc[], and pd.concat() to combine columns from different positions in a DataFrame..\n", "# 5) Explore random sampling techniques in Pandas, including weighted sampling to oversample specific cases.\n" ] }, { "cell_type": "markdown", "id": "fb30738e-82af-4198-bb15-1de9dba29005", "metadata": {}, "source": [ "Pandas is a powerful data manipulation and analysis library for Python, widely used for working with structured data." ] }, { "cell_type": "code", "execution_count": 4, "id": "219f1e81-8f78-407a-ada9-ca35e0586a8a", "metadata": {}, "outputs": [], "source": [ "# Import the required package\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 10, "id": "dbf98e2b-f485-4356-a7fb-5835a3db172d", "metadata": {}, "outputs": [], "source": [ "# Load Data\n", "housing_df = pd.read_csv(r'/Users/patriciaxufre/Downloads/WestRoxbury.csv')" ] }, { "cell_type": "code", "execution_count": 12, "id": "effbcb7c-f38a-4cda-9d2f-98d8567aef03", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(5802, 14)" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Find the dimension of the data frame\n", "housing_df.shape" ] }, { "cell_type": "code", "execution_count": 14, "id": "e87fa007-9e30-4601-adb7-ff1acf2afae1", "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", "
TOTAL VALUETAXLOT SQFTYR BUILTGROSS AREALIVING AREAFLOORSROOMSBEDROOMSFULL BATHHALF BATHKITCHENFIREPLACEREMODEL
0344.2433099651880243613522.0631110NaN
1412.6519065901945310819762.01042110Recent
2330.1415275001890229413712.0841110NaN
3498.66272137731957503226081.0951111NaN
4331.5417050001910237014382.0732010NaN
\n", "
" ], "text/plain": [ " TOTAL VALUE TAX LOT SQFT YR BUILT GROSS AREA LIVING AREA FLOORS \\\n", "0 344.2 4330 9965 1880 2436 1352 2.0 \n", "1 412.6 5190 6590 1945 3108 1976 2.0 \n", "2 330.1 4152 7500 1890 2294 1371 2.0 \n", "3 498.6 6272 13773 1957 5032 2608 1.0 \n", "4 331.5 4170 5000 1910 2370 1438 2.0 \n", "\n", " ROOMS BEDROOMS FULL BATH HALF BATH KITCHEN FIREPLACE REMODEL \n", "0 6 3 1 1 1 0 NaN \n", "1 10 4 2 1 1 0 Recent \n", "2 8 4 1 1 1 0 NaN \n", "3 9 5 1 1 1 1 NaN \n", "4 7 3 2 0 1 0 NaN " ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Show the first 5 rows\n", "housing_df.head()" ] }, { "cell_type": "code", "execution_count": 16, "id": "6ad2b13c-57bd-4a1a-9b7a-8dfd244ad660", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array(['TOTAL VALUE ', 'TAX', 'LOT SQFT ', 'YR BUILT', 'GROSS AREA ',\n", " 'LIVING AREA', 'FLOORS ', 'ROOMS', 'BEDROOMS ', 'FULL BATH',\n", " 'HALF BATH', 'KITCHEN', 'FIREPLACE', 'REMODEL'], dtype=object)" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Identify the names of the columns\n", "housing_df.columns.values" ] }, { "cell_type": "code", "execution_count": 18, "id": "16641259-e3f6-427a-8739-6dddf5aae052", "metadata": {}, "outputs": [], "source": [ "# Rename one column\n", "housing_df = housing_df.rename(columns = {'TOTAL VALUE ': 'T_VALUE'})" ] }, { "cell_type": "code", "execution_count": 20, "id": "8b61c60f-1e9a-4bb9-9d72-77f6022d92cc", "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", "
T_VALUETAXLOT SQFTYR BUILTGROSS AREALIVING AREAFLOORSROOMSBEDROOMSFULL BATHHALF BATHKITCHENFIREPLACEREMODEL
0344.2433099651880243613522.0631110NaN
1412.6519065901945310819762.01042110Recent
2330.1415275001890229413712.0841110NaN
\n", "
" ], "text/plain": [ " T_VALUE TAX LOT SQFT YR BUILT GROSS AREA LIVING AREA FLOORS \\\n", "0 344.2 4330 9965 1880 2436 1352 2.0 \n", "1 412.6 5190 6590 1945 3108 1976 2.0 \n", "2 330.1 4152 7500 1890 2294 1371 2.0 \n", "\n", " ROOMS BEDROOMS FULL BATH HALF BATH KITCHEN FIREPLACE REMODEL \n", "0 6 3 1 1 1 0 NaN \n", "1 10 4 2 1 1 0 Recent \n", "2 8 4 1 1 1 0 NaN " ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "housing_df.head(3)" ] }, { "cell_type": "code", "execution_count": 22, "id": "70296ae9-e643-4875-a459-d7298e82b2c9", "metadata": {}, "outputs": [], "source": [ "# Rename several columns: replace 'spaces' with '_' to allow dot notation\n", "housing_df.columns = [s.strip().replace(' ','_') for s in housing_df.columns]" ] }, { "cell_type": "code", "execution_count": 24, "id": "920a75b3-024d-47eb-a66d-0e736026c302", "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", "
T_VALUETAXLOT_SQFTYR_BUILTGROSS_AREALIVING_AREAFLOORSROOMSBEDROOMSFULL_BATHHALF_BATHKITCHENFIREPLACEREMODEL
0344.2433099651880243613522.0631110NaN
1412.6519065901945310819762.01042110Recent
2330.1415275001890229413712.0841110NaN
\n", "
" ], "text/plain": [ " T_VALUE TAX LOT_SQFT YR_BUILT GROSS_AREA LIVING_AREA FLOORS ROOMS \\\n", "0 344.2 4330 9965 1880 2436 1352 2.0 6 \n", "1 412.6 5190 6590 1945 3108 1976 2.0 10 \n", "2 330.1 4152 7500 1890 2294 1371 2.0 8 \n", "\n", " BEDROOMS FULL_BATH HALF_BATH KITCHEN FIREPLACE REMODEL \n", "0 3 1 1 1 0 NaN \n", "1 4 2 1 1 0 Recent \n", "2 4 1 1 1 0 NaN " ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "housing_df.head(3)" ] }, { "cell_type": "code", "execution_count": 26, "id": "39ffd6e1-c8ab-4e9e-8512-c1cbf346bd34", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0 4330\n", "1 5190\n", "2 4152\n", "3 6272\n", "Name: TAX, dtype: int64" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Practice showing some part of the data frame:\n", "# the first 4 rows of variable 'TAX'\n", "housing_df.loc[0:3,'TAX']" ] }, { "cell_type": "code", "execution_count": 28, "id": "36ed0b5b-bb2d-48b4-bf75-b92a6a4dc85e", "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", "
TAXLOT_SQFTYR_BUILT
0433099651880
1519065901945
2415275001890
36272137731957
\n", "
" ], "text/plain": [ " TAX LOT_SQFT YR_BUILT\n", "0 4330 9965 1880\n", "1 5190 6590 1945\n", "2 4152 7500 1890\n", "3 6272 13773 1957" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# the first 4 rows of the variables 2, 3 and 4 - iloc does not include the right extreme\n", "housing_df.iloc[0:4,1:4]" ] }, { "cell_type": "code", "execution_count": 13, "id": "bd0fc4e5-f5e9-4aeb-83fe-706f98ae94c0", "metadata": {}, "outputs": [], "source": [ "# Use pd.concat to combine non-consecutive columns into a new data frame\n", "# The axis argument specifies the dimension along which the concatenation happens: 0 - rows; 1 - columns " ] }, { "cell_type": "code", "execution_count": 34, "id": "b485cf6f-707f-404c-b1c8-6c58df18bd8f", "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", "
T_VALUETAXGROSS_AREALIVING_AREA
4331.5417023701438
5337.4424421241060
\n", "
" ], "text/plain": [ " T_VALUE TAX GROSS_AREA LIVING_AREA\n", "4 331.5 4170 2370 1438\n", "5 337.4 4244 2124 1060" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pd.concat([housing_df.iloc[4:6,0:2], housing_df.iloc[4:6,4:6]], axis = 1)" ] }, { "cell_type": "code", "execution_count": 15, "id": "e21fd59a-bed4-40d4-b47c-963714a408d4", "metadata": {}, "outputs": [], "source": [ "# To specify a data frame that is a subset of the initial data frame, use:" ] }, { "cell_type": "code", "execution_count": 38, "id": "9aadeb1a-c7b0-4f86-b43e-7ef4a33aea1a", "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", "
T_VALUETAXGROSS_AREALIVING_AREA
0344.2433024361352
1412.6519031081976
2330.1415222941371
3498.6627250322608
4331.5417023701438
\n", "
" ], "text/plain": [ " T_VALUE TAX GROSS_AREA LIVING_AREA\n", "0 344.2 4330 2436 1352\n", "1 412.6 5190 3108 1976\n", "2 330.1 4152 2294 1371\n", "3 498.6 6272 5032 2608\n", "4 331.5 4170 2370 1438" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "new_df = pd.concat([housing_df.iloc[:,0:2],housing_df.iloc[:,4:6]], axis = 1)\n", "new_df.head()" ] }, { "cell_type": "code", "execution_count": 17, "id": "26ca6c71-1b2f-462c-bfdd-2545ae5fe8b1", "metadata": {}, "outputs": [], "source": [ "# Sampling from a data frame\n", "# Obtaining a random sample of 5 observations from the data set" ] }, { "cell_type": "code", "execution_count": 44, "id": "c110910f-15b7-48a0-a2db-c0b86735aabf", "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", "
T_VALUETAXLOT_SQFTYR_BUILTGROSS_AREALIVING_AREAFLOORSROOMSBEDROOMSFULL_BATHHALF_BATHKITCHENFIREPLACEREMODEL
2940470.95923126061880403120702.0941111NaN
897306.3385367101960223210441.0621011NaN
5609418.4526350001935310718362.0832111Recent
4975384.0483057771958261012841.0521112NaN
3997295.1371235901950189812742.0731011NaN
\n", "
" ], "text/plain": [ " T_VALUE TAX LOT_SQFT YR_BUILT GROSS_AREA LIVING_AREA FLOORS \\\n", "2940 470.9 5923 12606 1880 4031 2070 2.0 \n", "897 306.3 3853 6710 1960 2232 1044 1.0 \n", "5609 418.4 5263 5000 1935 3107 1836 2.0 \n", "4975 384.0 4830 5777 1958 2610 1284 1.0 \n", "3997 295.1 3712 3590 1950 1898 1274 2.0 \n", "\n", " ROOMS BEDROOMS FULL_BATH HALF_BATH KITCHEN FIREPLACE REMODEL \n", "2940 9 4 1 1 1 1 NaN \n", "897 6 2 1 0 1 1 NaN \n", "5609 8 3 2 1 1 1 Recent \n", "4975 5 2 1 1 1 2 NaN \n", "3997 7 3 1 0 1 1 NaN " ] }, "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sample_1 = housing_df.sample(5)\n", "sample_1" ] }, { "cell_type": "code", "execution_count": 19, "id": "008e4294-a992-4f06-b7df-0f08e404c236", "metadata": {}, "outputs": [], "source": [ "# Oversample houses with over 10 rooms " ] }, { "cell_type": "code", "execution_count": 46, "id": "c5fcdb08-82c1-4548-9ef5-ee171939f715", "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", "
T_VALUETAXLOT_SQFTYR_BUILTGROSS_AREALIVING_AREAFLOORSROOMSBEDROOMSFULL_BATHHALF_BATHKITCHENFIREPLACEREMODEL
1837409.5515148641950399821761.51142121NaN
4326358.8451328281964227218472.0632111NaN
686500.0629080001966440034941.01264022NaN
3854419.6527857301931247118701.0622011Recent
5002414.4521361651930303318312.0731111NaN
\n", "
" ], "text/plain": [ " T_VALUE TAX LOT_SQFT YR_BUILT GROSS_AREA LIVING_AREA FLOORS \\\n", "1837 409.5 5151 4864 1950 3998 2176 1.5 \n", "4326 358.8 4513 2828 1964 2272 1847 2.0 \n", "686 500.0 6290 8000 1966 4400 3494 1.0 \n", "3854 419.6 5278 5730 1931 2471 1870 1.0 \n", "5002 414.4 5213 6165 1930 3033 1831 2.0 \n", "\n", " ROOMS BEDROOMS FULL_BATH HALF_BATH KITCHEN FIREPLACE REMODEL \n", "1837 11 4 2 1 2 1 NaN \n", "4326 6 3 2 1 1 1 NaN \n", "686 12 6 4 0 2 2 NaN \n", "3854 6 2 2 0 1 1 Recent \n", "5002 7 3 1 1 1 1 NaN " ] }, "execution_count": 46, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w = [0.99 if r > 10 else 0.01 for r in housing_df.ROOMS]\n", "sample_2 = housing_df.sample(5, weights = w)\n", "sample_2" ] }, { "cell_type": "code", "execution_count": 48, "id": "540f4ca7-109a-4693-a2eb-11678842d27b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "T_VALUE float64\n", "TAX int64\n", "LOT_SQFT int64\n", "YR_BUILT int64\n", "GROSS_AREA int64\n", "LIVING_AREA int64\n", "FLOORS float64\n", "ROOMS int64\n", "BEDROOMS int64\n", "FULL_BATH int64\n", "HALF_BATH int64\n", "KITCHEN int64\n", "FIREPLACE int64\n", "REMODEL object\n", "dtype: object" ] }, "execution_count": 48, "metadata": {}, "output_type": "execute_result" } ], "source": [ "housing_df.dtypes" ] }, { "cell_type": "code", "execution_count": 22, "id": "f31a8946-8f55-43ce-880e-1ff0f2461d40", "metadata": {}, "outputs": [], "source": [ "# TAX needs to be converted to a numerical continuous variable\n", "# LOT_SQFT needs to be converted to a numerical continuous variable\n", "# GROSS_AREA needs to be converted to a numerical continuous variable\n", "# LIVING_AREA needs to be converted to a numerical continuous variable\n", "# FLOORS needs to be converted to a numerical discrete variable\n", "# REMODEL needs to be converted to a categorical variable" ] }, { "cell_type": "code", "execution_count": 50, "id": "b3ec834b-ec3b-48a9-9e06-b9047de89942", "metadata": {}, "outputs": [], "source": [ "housing_df.TAX = housing_df.TAX.astype('float64')\n", "housing_df.LOT_SQFT = housing_df.LOT_SQFT.astype('float64')\n", "housing_df.GROSS_AREA = housing_df.GROSS_AREA.astype('float64')\n", "housing_df.LIVING_AREA = housing_df.LIVING_AREA.astype('float64')\n", "housing_df.FLOORS = housing_df.FLOORS.astype('int64')\n", "housing_df.REMODEL = housing_df.REMODEL.astype('category')" ] }, { "cell_type": "code", "execution_count": 52, "id": "ffdb0e00-f9df-498b-8307-1ea1024da704", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "T_VALUE float64\n", "TAX float64\n", "LOT_SQFT float64\n", "YR_BUILT int64\n", "GROSS_AREA float64\n", "LIVING_AREA float64\n", "FLOORS int64\n", "ROOMS int64\n", "BEDROOMS int64\n", "FULL_BATH int64\n", "HALF_BATH int64\n", "KITCHEN int64\n", "FIREPLACE int64\n", "REMODEL category\n", "dtype: object" ] }, "execution_count": 52, "metadata": {}, "output_type": "execute_result" } ], "source": [ "housing_df.dtypes" ] }, { "cell_type": "code", "execution_count": 24, "id": "b42a5548-70d4-4749-8b4d-5e9722489fab", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index(['Old', 'Recent'], dtype='object')" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:base] *", "language": "python", "name": "conda-base-py" }, "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.12.7" } }, "nbformat": 4, "nbformat_minor": 5 }