text_html_output_1.png
import os

import os

import pandas as pd

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

import numpy as np
import pandas as pd
import os

import os
directories = ['../input/csc4851-homework4/birds_400/test', '../input/csc4851-homework4/birds_400/train', '../input//csc4851-homework4/birds_400/valid']
for dir in directories:
    label = []
    path = []
    for dirname, _, filenames in os.walk(dir):
        for filename in filenames:
            label.append(os.path.split(dirname)[1])
            path.append(os.path.join(dirname, filename))
    if dir == directories[0]:
        df_test = pd.DataFrame(columns=['path', 'label'])
        df_test['path'] = path
        df_test['label'] = label
    elif dir == directories[1]:
        df_train = pd.DataFrame(columns=['path', 'label'])
        df_train['path'] = path
        df_train['label'] = label
    elif dir == directories[2]:
        df_valid = pd.DataFrame(columns=['path', 'label'])
        df_valid['path'] = path
        df_valid['label'] = label

df_train.head()