<jupyter_start><jupyter_text>A mini Machine Learning Project exploring feature and model selection This code will:    - Loads the clean data    - Performs some EDA (creates at least one table and one visualization)- Exporting the visualization to an image inside img folder and 2 tables into table files inside data folder.<jupyter_code># Loading all needed library
import numpy as np
import pandas as pd

import matplotlib.pyplot as plt
%matplotlib inline
# Importing data
df = pd.read_csv("../data/data_clean.csv")

# Take a glance at the dataset:
df.head()<jupyter_output><empty_output><jupyter_text>Exploratory data analysis (EDA)  Missing dataThe data repository makes a note that there are missing values in this dataset, so I will take a look at how bad the situation is:<jupyter_code># Explore the missing data:
missing = []
for i in list(df):
    missing.append([i,df[df[i].isnull()].shape[0]])
missing = pd.DataFrame(missing)
missing.columns = ['Feature', 'Mising_value']
missing
# Exporting the missing value number table into a new file:
missing.to_csv("../data/table/missing.csv",index=False)<jupyter_output><empty_output><jupyter_text>Then, we will take a look at some statistic of all features since all 64 features are continuous values.<jupyter_code>describe = df.describe()
describe
# Exporting the missing value number table into a new file:
describe.to_csv("../data/table/stat_describe.csv")<jupyter_output><empty_output><jupyter_text>Then we will take a look at the differences between two groups (bankrupt and not bankrupt companies) with regards to three important features:- Attr4: current assets / short-term liabilities- Attr17: total assets / total liabilities  - Attr23: net profit / sales<jupyter_code>preli_plot = df.groupby(["bankrupt"])["Attr23","Attr17","Attr4"].mean().plot(kind="bar",title="Prelimenary plot",figsize=(12,7))
preli_plot
# Exporting the graph into a new image file:
fig = preli_plot.get_figure()
fig.savefig("img/preview_plot.png")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09845847836897066, 'fraction_numerical': 0.008453505718547987, 'mean_word_length': 5.8668941979522184, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '445931', 'license': 'MIT', 'n_tokens_mistral': 620, 'n_tokens_neox': 593, 'n_words': 213, 'path': 'src/EDA.ipynb', 'repo_name': 'DuongVu39/Polish_companies_Bankruptcy', 'size': '2011'}