image_output_1.png
import pandas as pd

import seaborn as sns

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import RepeatedStratifiedKFold, StratifiedKFold, KFold
from scipy.cluster.hierarchy import dendrogram, ward
sns.set_theme(style='white', palette='viridis')
pal = sns.color_palette('viridis')
pd.set_option('display.max_rows', 100)

train = pd.read_csv('../input/playground-series-s3e14/train.csv')
test_1 = pd.read_csv('../input/playground-series-s3e14/test.csv')
orig_train = pd.read_csv('../input/wild-blueberry-yield-prediction-dataset/WildBlueberryPollinationSimulationData.csv')
train.drop('id', axis=1, inplace=True)
test = test_1.drop('id', axis=1)
orig_train.drop('Row#', axis=1, inplace=True)

desc = pd.DataFrame(index=orig_train.columns)
desc['count'] = len(orig_train)
desc['nunique'] = orig_train.nunique()
desc['%unique'] = desc['nunique'] / len(orig_train) * 100
desc['null'] = orig_train.isna().sum()
desc['type'] = orig_train.dtypes
desc

feature_set_1 = ['RainingDays', 'AverageRainingDays']
feature_set_2 = ['MaxOfUpperTRange', 'MinOfUpperTRange', 'AverageOfUpperTRange', 'MaxOfLowerTRange', 'MinOfLowerTRange', 'AverageOfLowerTRange']
feature_set_3 = ['fruitset', 'fruitmass', 'seeds']

orig_train[-orig_train.duplicated(subset=feature_set_1)].loc[:, feature_set_1]