4. Update Descriptions to Tables
In [1]:
Copied!
import featurebyte as fb
# Set your profile to the tutorial environment
fb.use_profile("tutorial")
catalog_name = "Loan Applications Dataset SDK Tutorial"
catalog = fb.Catalog.activate(catalog_name)
import featurebyte as fb
# Set your profile to the tutorial environment
fb.use_profile("tutorial")
catalog_name = "Loan Applications Dataset SDK Tutorial"
catalog = fb.Catalog.activate(catalog_name)
14:07:25 | INFO | SDK version: 3.0.1.dev45 INFO :featurebyte:SDK version: 3.0.1.dev45 14:07:25 | INFO | No catalog activated. INFO :featurebyte:No catalog activated. 14:07:25 | INFO | Using profile: tutorial INFO :featurebyte:Using profile: tutorial 14:07:25 | INFO | Using configuration file at: /Users/gxav/.featurebyte/config.yaml INFO :featurebyte:Using configuration file at: /Users/gxav/.featurebyte/config.yaml 14:07:25 | INFO | Active profile: tutorial (https://tutorials.featurebyte.com/api/v1) INFO :featurebyte:Active profile: tutorial (https://tutorials.featurebyte.com/api/v1) 14:07:25 | INFO | SDK version: 3.0.1.dev45 INFO :featurebyte:SDK version: 3.0.1.dev45 14:07:25 | INFO | No catalog activated. INFO :featurebyte:No catalog activated. 14:07:25 | INFO | Catalog activated: Loan Applications Dataset SDK Tutorial INFO :featurebyte.api.catalog:Catalog activated: Loan Applications Dataset SDK Tutorial 16:05:56 | WARNING | Remote SDK version (1.1.0.dev7) is different from local (1.1.0.dev1). Update local SDK to avoid unexpected behavior. 16:05:56 | INFO | No catalog activated. 16:05:56 | INFO | Catalog activated: Grocery Dataset Tutorial
Get tables from the catalog first¶
In [2]:
Copied!
catalog.list_tables()
catalog.list_tables()
Out[2]:
id | name | type | status | entities | created_at | |
---|---|---|---|---|---|---|
0 | 683d3a70f4d55cd61d526cee | CREDIT_CARD_MONTHLY_BALANCE | time_series_table | PUBLIC_DRAFT | [Client] | 2025-06-02T05:45:20.813000 |
1 | 683d3a6ef4d55cd61d526ced | LOAN_STATUS | scd_table | PUBLIC_DRAFT | [Loan, PriorApplication] | 2025-06-02T05:45:18.744000 |
2 | 683d3a6cf4d55cd61d526cec | PREVIOUS_APPLICATION | event_table | PUBLIC_DRAFT | [PriorApplication, Client] | 2025-06-02T05:45:16.825000 |
3 | 683d3a6af4d55cd61d526ceb | INSTALLMENTS_PAYMENTS | event_table | PUBLIC_DRAFT | [Installment, PriorApplication] | 2025-06-02T05:45:14.598000 |
4 | 683d3a69f4d55cd61d526cea | BUREAU | event_table | PUBLIC_DRAFT | [Client, BureauReportedCredit] | 2025-06-02T05:45:13.206000 |
5 | 683d3a66f4d55cd61d526ce9 | CLIENT_PROFILE | scd_table | PUBLIC_DRAFT | [Client] | 2025-06-02T05:45:11.014000 |
6 | 683d3a64f4d55cd61d526ce8 | NEW_APPLICATION | dimension_table | PUBLIC_DRAFT | [New Application, Client] | 2025-06-02T05:45:08.853000 |
In [3]:
Copied!
new_application = catalog.get_table("NEW_APPLICATION")
client_profile = catalog.get_table("CLIENT_PROFILE")
bureau = catalog.get_table("BUREAU")
previous_application = catalog.get_table("PREVIOUS_APPLICATION")
loan_status = catalog.get_table("LOAN_STATUS")
installments_payments = catalog.get_table("INSTALLMENTS_PAYMENTS")
credit_card_balance = catalog.get_table("CREDIT_CARD_MONTHLY_BALANCE")
new_application = catalog.get_table("NEW_APPLICATION")
client_profile = catalog.get_table("CLIENT_PROFILE")
bureau = catalog.get_table("BUREAU")
previous_application = catalog.get_table("PREVIOUS_APPLICATION")
loan_status = catalog.get_table("LOAN_STATUS")
installments_payments = catalog.get_table("INSTALLMENTS_PAYMENTS")
credit_card_balance = catalog.get_table("CREDIT_CARD_MONTHLY_BALANCE")
Discover the current descriptions of tables¶
In [4]:
Copied!
new_application.description
new_application.description
Out[4]:
'Contains information about new loan applications submitted by clients.'
In [5]:
Copied!
client_profile.description
client_profile.description
Out[5]:
'Describes the profile for each client.'
In [6]:
Copied!
bureau.description
bureau.description
Out[6]:
'Lists credits taken by clients from other financial institutions, as reported to the credit bureau.'
In [7]:
Copied!
previous_application.description
previous_application.description
Out[7]:
'Details prior loan applications by the client.'
In [8]:
Copied!
loan_status.description
loan_status.description
Out[8]:
'Tracks whether loan was terminated.'
In [9]:
Copied!
installments_payments.description
installments_payments.description
Out[9]:
'Logs monthly installments for loans at the time of payment.'
In [10]:
Copied!
credit_card_balance.description
credit_card_balance.description
Out[10]:
'Monthly balance summaries for credit cards.'
Update descriptions of one table¶
In [11]:
Copied!
new_application.update_description('new loan applications.')
new_application.update_description('new loan applications.')
In [12]:
Copied!
new_application.description
new_application.description
Out[12]:
'new loan applications.'
In [13]:
Copied!
new_application.update_description('Records new loan applications.')
new_application.update_description('Records new loan applications.')
Discover the current descriptions of columns for NEW_APPLICATION¶
You can either display all columns together
In [14]:
Copied!
import pandas as pd
pd.DataFrame(new_application.info(verbose=True)["columns_info"])
import pandas as pd
pd.DataFrame(new_application.info(verbose=True)["columns_info"])
Out[14]:
name | dtype | entity | semantic | critical_data_info | description | |
---|---|---|---|---|---|---|
0 | SK_ID_CURR | INT | New Application | dimension_id | None | ID of application |
1 | ClientID | INT | Client | None | None | ID of the client |
2 | CONTRACT_TYPE | VARCHAR | None | None | None | Identification if loan is cash or revolving |
3 | AMT_INCOME_TOTAL | FLOAT | None | None | None | Income of the client |
4 | AMT_CREDIT | FLOAT | None | None | None | Credit amount of the loan |
... | ... | ... | ... | ... | ... | ... |
107 | AMT_REQ_CREDIT_BUREAU_WEEK | FLOAT | None | None | None | Number of enquiries to Credit Bureau about the... |
108 | AMT_REQ_CREDIT_BUREAU_MON | FLOAT | None | None | None | Number of enquiries to Credit Bureau about the... |
109 | AMT_REQ_CREDIT_BUREAU_QRT | FLOAT | None | None | None | Number of enquiries to Credit Bureau about the... |
110 | AMT_REQ_CREDIT_BUREAU_YEAR | FLOAT | None | None | None | Number of enquiries to Credit Bureau about the... |
111 | available_at | TIMESTAMP | None | record_creation_timestamp | None | Timestamp the record was added to the database |
112 rows × 6 columns
Or display each column one by one
In [15]:
Copied!
for column in new_application.columns:
print(f"{column}: {new_application[column].description}")
for column in new_application.columns:
print(f"{column}: {new_application[column].description}")
SK_ID_CURR: ID of application ClientID: ID of the client CONTRACT_TYPE: Identification if loan is cash or revolving AMT_INCOME_TOTAL: Income of the client AMT_CREDIT: Credit amount of the loan AMT_ANNUITY: Loan annuity AMT_GOODS_PRICE: For consumer loans it is the price of the goods for which the loan is given TYPE_SUITE: Who was accompanying client when he was applying for the loan REGION_POPULATION_RELATIVE: Normalized population of region where client lives (higher number means the client lives in more populated region) application_time: Application timestamp DAYS_EMPLOYED: How many days before the application the person started current employment DAYS_REGISTRATION: How many days before the application did client change his registration DAYS_ID_PUBLISH: How many days before the application did client change the identity document with which he applied for the loan OWN_CAR_AGE: Age of client car FLAG_MOBIL: Did client provide mobile phone (1=YES, 0=NO) FLAG_EMP_PHONE: Did client provide work phone (1=YES, 0=NO) FLAG_WORK_PHONE: Did client provide home phone (1=YES, 0=NO) FLAG_CONT_MOBILE: Was mobile phone reachable (1=YES, 0=NO) FLAG_PHONE: Did client provide home phone (1=YES, 0=NO) FLAG_EMAIL: Did client provide email (1=YES, 0=NO) REGION_RATING_CLIENT: Our rating of the region where client lives (1,2,3) REGION_RATING_CLIENT_W_CITY: Our rating of the region where client lives with taking city into account (1,2,3) WEEKDAY_APPR_PROCESS_START: On which day of the week did the client apply for the loan HOUR_APPR_PROCESS_START: Approximately at what hour did the client apply for the loan REG_REGION_NOT_LIVE_REGION: Flag if client permanent address does not match contact address (1=different, 0=same, at region level) REG_REGION_NOT_WORK_REGION: Flag if client permanent address does not match work address (1=different, 0=same, at region level) LIVE_REGION_NOT_WORK_REGION: Flag if client contact address does not match work address (1=different, 0=same, at region level) REG_CITY_NOT_LIVE_CITY: Flag if client permanent address does not match contact address (1=different, 0=same, at city level) REG_CITY_NOT_WORK_CITY: Flag if client permanent address does not match work address (1=different, 0=same, at city level) LIVE_CITY_NOT_WORK_CITY: Flag if client contact address does not match work address (1=different, 0=same, at city level) EXT_SOURCE_1: Normalized score from external data source EXT_SOURCE_2: Normalized score from external data source EXT_SOURCE_3: Normalized score from external data source APARTMENTS_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor BASEMENTAREA_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor YEARS_BEGINEXPLUATATION_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor YEARS_BUILD_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor COMMONAREA_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor ELEVATORS_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor ENTRANCES_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor FLOORSMAX_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor FLOORSMIN_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LANDAREA_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LIVINGAPARTMENTS_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LIVINGAREA_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor NONLIVINGAPARTMENTS_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor NONLIVINGAREA_AVG: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor APARTMENTS_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor BASEMENTAREA_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor YEARS_BEGINEXPLUATATION_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor YEARS_BUILD_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor COMMONAREA_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor ELEVATORS_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor ENTRANCES_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor FLOORSMAX_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor FLOORSMIN_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LANDAREA_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LIVINGAPARTMENTS_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LIVINGAREA_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor NONLIVINGAPARTMENTS_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor NONLIVINGAREA_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor APARTMENTS_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor BASEMENTAREA_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor YEARS_BEGINEXPLUATATION_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor YEARS_BUILD_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor COMMONAREA_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor ELEVATORS_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor ENTRANCES_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor FLOORSMAX_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor FLOORSMIN_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LANDAREA_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LIVINGAPARTMENTS_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor LIVINGAREA_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor NONLIVINGAPARTMENTS_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor NONLIVINGAREA_MEDI: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor FONDKAPREMONT_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor HOUSETYPE_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor TOTALAREA_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor WALLSMATERIAL_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor EMERGENCYSTATE_MODE: Normalized information about building where the client lives, What is average (_AVG suffix), modus (_MODE suffix), median (_MEDI suffix) apartment size, common area, living area, age of building, number of elevators, number of entrances, state of the building, number of floor OBS_30_CNT_SOCIAL_CIRCLE: How many observation of client social surroundings with observable 30 DPD (days past due) default DEF_30_CNT_SOCIAL_CIRCLE: How many observation of client social surroundings defaulted on 30 DPD (days past due) OBS_60_CNT_SOCIAL_CIRCLE: How many observation of client social surroundings with observable 60 DPD (days past due) default DEF_60_CNT_SOCIAL_CIRCLE: How many observation of client social surroundings defaulted on 60 (days past due) DPD DAYS_LAST_PHONE_CHANGE: How many days before application did client change phone FLAG_DOCUMENT_2: Did client provide document 2 FLAG_DOCUMENT_3: Did client provide document 3 FLAG_DOCUMENT_4: Did client provide document 4 FLAG_DOCUMENT_5: Did client provide document 5 FLAG_DOCUMENT_6: Did client provide document 6 FLAG_DOCUMENT_7: Did client provide document 7 FLAG_DOCUMENT_8: Did client provide document 8 FLAG_DOCUMENT_9: Did client provide document 9 FLAG_DOCUMENT_10: Did client provide document 10 FLAG_DOCUMENT_11: Did client provide document 11 FLAG_DOCUMENT_12: Did client provide document 12 FLAG_DOCUMENT_13: Did client provide document 13 FLAG_DOCUMENT_14: Did client provide document 14 FLAG_DOCUMENT_15: Did client provide document 15 FLAG_DOCUMENT_16: Did client provide document 16 FLAG_DOCUMENT_17: Did client provide document 17 FLAG_DOCUMENT_18: Did client provide document 18 FLAG_DOCUMENT_19: Did client provide document 19 FLAG_DOCUMENT_20: Did client provide document 20 FLAG_DOCUMENT_21: Did client provide document 21 AMT_REQ_CREDIT_BUREAU_HOUR: Number of enquiries to Credit Bureau about the client one hour before application AMT_REQ_CREDIT_BUREAU_DAY: Number of enquiries to Credit Bureau about the client one day before application (excluding one hour before application) AMT_REQ_CREDIT_BUREAU_WEEK: Number of enquiries to Credit Bureau about the client one week before application (excluding one day before application) AMT_REQ_CREDIT_BUREAU_MON: Number of enquiries to Credit Bureau about the client one month before application (excluding one week before application) AMT_REQ_CREDIT_BUREAU_QRT: Number of enquiries to Credit Bureau about the client 3 month before application (excluding one month before application) AMT_REQ_CREDIT_BUREAU_YEAR: Number of enquiries to Credit Bureau about the client one day year (excluding last 3 months before application) available_at: Timestamp the record was added to the database
Update column descriptions¶
If the description is incorrect or incomplete, you can edit it
In [16]:
Copied!
# By using the table method: update_column_description
new_application.update_column_description(
"DAYS_EMPLOYED",
"How many days before the application the person started current employment"
)
# By using the table method: update_column_description
new_application.update_column_description(
"DAYS_EMPLOYED",
"How many days before the application the person started current employment"
)
In [17]:
Copied!
# Or by using the column method: update_description
new_application.DAYS_EMPLOYED.update_description(
"How many days before the application the person started current employment"
)
# Or by using the column method: update_description
new_application.DAYS_EMPLOYED.update_description(
"How many days before the application the person started current employment"
)
That's it for this tutorial. Again, this is an optional step, but it can drastically improve FeatureByte's feature ideation.