text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

target = 'yield'
df1 = pd.read_csv(TRAIN_CSV)
df1.rename({'Id': 'id'}, axis=1, inplace=True)
df1['test'] = 0
df1['gen'] = 1
df2 = pd.read_csv(TEST_CSV)
df2.rename({'Id': 'id'}, axis=1, inplace=True)
df2['test'] = 1
df2['gen'] = 1
df3 = pd.read_csv(EXTERNAL_CSV)
df3.rename({'Row#': 'id'}, axis=1, inplace=True)
df3['test'] = 0
df3['gen'] = 0
df = pd.concat([df1, df2, df3])
df.id.fillna(-1, inplace=True)
df.id = df.id.astype(int)
df.reset_index(inplace=True)
df.drop('index', axis=1, inplace=True)

df.columns

if True:
    num_columns = ['fruitset', 'fruitmass', 'seeds']
    ncols = 4
    for n, col in enumerate(num_columns):
        if n % ncols == 0:
            fig, axs = plt.subplots(ncols=ncols, figsize=(24, 6))
        ax = axs[n % ncols]
        sns.histplot(data=df[col], ax=ax)