text_html_output_1.png text_plain_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/*/*')])
print('Total Samples', train_df.shape[0])
print('Sample Summary\n', pd.value_counts(train_df['type_cat']))
train_df.sample(3)