text_html_output_1.png
from glob import glob

import os

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

train_df = pd.DataFrame([dict(path=c_path, image_name=os.path.basename(c_path), type_cat=os.path.basename(os.path.dirname(c_path))) for c_path in glob('../input/train/*/*')])
train_df.sample(3)

test_df = pd.DataFrame([dict(path=c_path, image_name=os.path.basename(c_path)) for c_path in glob('../input/test/*')])
test_df.sample(3)