text_plain_output_1.png
import numpy as np # linear algebra

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)

sample_img = train_df.iloc[1, 0]
sample_labels = train_df.iloc[1, :]
sample_labels = np.asarray(sample_labels)
print('Image Name:{}'.format(sample_img))
print('Image Labels:{}'.format(sample_labels))