# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python [conda env:ds_credit_scorecard] *
#     language: python
#     name: conda-env-ds_credit_scorecard-py
# ---

# %load_ext autoreload
# %autoreload 2

# +
import sqlite3
import pandas as pd
import numpy as np
from ds_credit_scorecard.data import loan as loan_data

pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)
# -

df = loan_data.get_data()
df.head()

df.columns.values

df_ = df["term"].str.strip(to_strip=" months").astype(np.uint16)
df_.head()

df.head()

df["id"][0]

df[(df["annual_inc"].notna()) & (df["annual_inc_joint"].notna())].head()

df["home_ownership"].unique()

df["loan_status"].value_counts()

df.replace("", np.NaN).isna().sum(axis=0)

len(df)

2260668 - 2227612



StarcoderdataJupyterScriptsDedupFiltered