text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

train_df = pd.read_csv('../input/plant-pathology-2020-fgvc7/train.csv')

def get_label(row):
    for c in train_df.columns[1:]:
        if row[c] == 1:
            return c
train_df_copy = train_df.copy()
train_df_copy['label'] = train_df_copy.apply(get_label, axis=1)

train_df_copy.drop(['healthy', 'multiple_diseases', 'rust', 'scab'], axis=1, inplace=True)

train_df_copy.head(5)