text_plain_output_1.png
from colorama import Style, Fore

import pandas as pd

import seaborn as sns

import warnings

import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from xgboost import XGBRegressor
from sklearn.metrics import mean_squared_error
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline
from sklearn.base import TransformerMixin
from sklearn.model_selection import KFold
from sklearn.ensemble import GradientBoostingRegressor
from lightgbm import LGBMRegressor
rc = {'axes.facecolor': '#FFF9ED', 'figure.facecolor': '#FFF9ED', 'axes.edgecolor': '#000000', 'grid.color': '#EBEBE7', 'font.family': 'serif', 'axes.labelcolor': '#000000', 'xtick.color': '#000000', 'ytick.color': '#000000', 'grid.alpha': 0.4}
sns.set(rc=rc)
from colorama import Style, Fore
red = Style.BRIGHT + Fore.RED
blue = Style.BRIGHT + Fore.BLUE
megnta = Style.BRIGHT + Fore.MAGENTA
gold = Style.BRIGHT + Fore.YELLOW
res = Style.RESET_ALL
import warnings
warnings.filterwarnings('ignore')

old_df = pd.read_csv('/kaggle/input/regression-with-neural-networking/concrete_data.csv')
original_df = pd.read_csv('/kaggle/input/playground-series-s3e9/train.csv').drop(columns=['id'])
test_df = pd.read_csv('/kaggle/input/playground-series-s3e9/test.csv').drop(columns=['id'])
sample = pd.read_csv('/kaggle/input/playground-series-s3e9/sample_submission.csv')

print(f'{red} [Name] ->{blue} Shape\n')
print(f'{gold}[+] {red} [original_df] -> {blue}{original_df.shape}\n')
print(f'{gold}[+] {red} [old_df] -> {blue}{old_df.shape}\n')
print(f'{gold}[+] {red} [test_df] -> {blue}{test_df.shape}\n')
print('\n')
print(f'{red} [Name] ->{blue} Missing Values\n')
print(f'{gold}[+] {red} [original_df] -> {blue}{original_df.isna().any().any()}\n')
print(f'{gold}[+] {red} [old_df] -> {blue}{old_df.isna().any().any()}\n')
print(f'{gold}[+] {red} [test_df] -> {blue}{test_df.isna().any().any()}\n')
print('\n')
original_num_cols_int = [col for col in original_df.columns if original_df[col].dtype == 'int']
original_num_cols_float = [col for col in original_df.columns if original_df[col].dtype == 'float']
original_num_cols_obj = [col for col in original_df.columns if original_df[col].dtype == 'o']
old_num_cols_int = [col for col in old_df.columns if old_df[col].dtype == 'int']
old_num_cols_float = [col for col in old_df.columns if old_df[col].dtype == 'float']
old_num_cols_obj = [col for col in old_df.columns if old_df[col].dtype == 'o']
test_num_cols_int = [col for col in test_df.columns if test_df[col].dtype == 'int']
test_num_cols_float = [col for col in test_df.columns if test_df[col].dtype == 'float']
test_num_cols_obj = [col for col in test_df.columns if test_df[col].dtype == 'o']
print(f'{red} [Name] ->{blue} Dtype -> {megnta}Total Col.\n')
print('\n')
print(f'{gold}[+] {red} [original_df] -> {blue} int32 ->{megnta} {len(original_num_cols_int)} \n')
print(f'{gold}[+] {red} [original_df] -> {blue} flaot32 ->{megnta} {len(original_num_cols_float)}\n')
print(f'{gold}[+] {red} [original_df] -> {blue} obj ->{megnta} {len(original_num_cols_obj)}\n')
print('\n')
print(f'{gold}[+] {red} [old_df] -> {blue} int32 ->{megnta} {len(old_num_cols_int)} \n')
print(f'{gold}[+] {red} [old_df] -> {blue} flaot32 ->{megnta} {len(old_num_cols_float)}\n')
print(f'{gold}[+] {red} [old_df] -> {blue} obj ->{megnta} {len(old_num_cols_obj)}\n')
print('\n')
print(f'{gold}[+] {red} [test_df] -> {blue} int32 ->{megnta} {len(test_num_cols_int)} \n')
print(f'{gold}[+] {red} [test_df] -> {blue} flaot32 ->{megnta} {len(test_num_cols_float)}\n')
print(f'{gold}[+] {red} [test_df] -> {blue} obj ->{megnta} {len(test_num_cols_obj)}\n')
print('\n')