<jupyter_start><jupyter_text>Loading The Data and Dataframes<jupyter_code>!wget https://labs-fannie-data.s3.amazonaws.com/Acquisition/Acquisition_2000Q1.txt
!wget https://labs-fannie-data.s3.amazonaws.com/Performance/Performance_2000Q1.txt
a_df, p_df = load_dataframes_fannie(
    "Acquisition_2000Q1.txt",
    "Performance_2000Q1.txt"
)<jupyter_output><empty_output><jupyter_text>Acquisitions Data AnalysisWe will first run an analysis of the `Acquisition` data.<jupyter_code>print(a_df.columns)<jupyter_output>Index(['LOAN_ID', 'ORIG_CHN', 'Seller.Name', 'ORIG_RT', 'ORIG_AMT', 'ORIG_TRM',
       'ORIG_DTE', 'FRST_DTE', 'OLTV', 'OCLTV', 'NUM_BO', 'DTI', 'CSCORE_B',
       'FTHB_FLG', 'PURPOSE', 'PROP_TYP', 'NUM_UNIT', 'OCC_STAT', 'STATE',
       'ZIP_3', 'MI_PCT', 'Product.Type', 'CSCORE_C', 'MI_TYPE',
       'RELOCATION_FLG'],
      dtype='object')<jupyter_text>Columns to Analyze.We will study the following:- `ORIG_RT`- `ORIG_AMT`- `OLTV`- `OCLTV`- `DTI`- `CSCORE_B` Descriptive StatisticsFirst, let's investigate the descriptive statistics involved.<jupyter_code>def print_descriptive_stats(column):
    """
    """
    print(f"Getting Descriptive Statistics")
    print(f"Column Name: '{column.name}'")
    fig = plt.hist(column)
    print(f"Mean Value: {column.mean()}")
    print(f"STD  Value: {column.std()}")
    print(f"Min  Value: {column.min()}")
    print(f"Max  Value: {column.max()}")<jupyter_output><empty_output><jupyter_text>Original Rate<jupyter_code>print_descriptive_stats(a_df["ORIG_RT"])<jupyter_output>Getting Descriptive Statistics
Column Name: 'ORIG_RT'
Mean Value: 8.009949947946838
STD  Value: 0.4556470117137119
Min  Value: 3.0
Max  Value: 12.325<jupyter_text>Original Amount<jupyter_code>print_descriptive_stats(a_df['ORIG_AMT'])<jupyter_output>Getting Descriptive Statistics
Column Name: 'ORIG_AMT'
Mean Value: 119903.06769341699
STD  Value: 56474.703864902054
Min  Value: 6000
Max  Value: 486000<jupyter_text>Original Loan To Value<jupyter_code>print_descriptive_stats(a_df['OLTV'])<jupyter_output>Getting Descriptive Statistics
Column Name: 'OLTV'
Mean Value: 76.43044466319103
STD  Value: 16.321432152016186
Min  Value: 4.0
Max  Value: 97.0<jupyter_text>Original Combined Loan to Value<jupyter_code>print_descriptive_stats(a_df['OCLTV'])<jupyter_output>Getting Descriptive Statistics
Column Name: 'OCLTV'
Mean Value: 88.93156281920326
STD  Value: 10.050201938620017
Min  Value: 25.0
Max  Value: 146.0<jupyter_text>Debt To Income<jupyter_code>print_descriptive_stats(a_df['DTI'])<jupyter_output>Getting Descriptive Statistics
Column Name: 'DTI'
Mean Value: 34.361626863903325
STD  Value: 11.999554980602742
Min  Value: 1.0
Max  Value: 64.0<jupyter_text>Credit Score of Primary Borrower<jupyter_code>print_descriptive_stats(a_df['CSCORE_B'])<jupyter_output>Getting Descriptive Statistics
Column Name: 'CSCORE_B'
Mean Value: 714.993915472381
STD  Value: 54.9676797046954
Min  Value: 350.0
Max  Value: 850.0
{'fraction_non_alphanumeric': 0.12737771739130435, 'fraction_numerical': 0.08899456521739131, 'mean_word_length': 6.89544235924933, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '100861', 'license': 'MIT', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1153, 'n_words': 208, 'path': 'notebooks/DataLoading-Basic_Analysis.ipynb', 'repo_name': 'Machine-Learning-for-Finance/Machine-Learning-Algorithms', 'size': '2944'}