text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

WORK_DIR = '../input/ranzcr-clip-catheter-line-classification'
os.listdir(WORK_DIR)

train = pd.read_csv(os.path.join(WORK_DIR, 'train.csv'))
train_images = '../input/ranzcr-clip-catheter-line-classification' + '/train/' + train['StudyInstanceUID'] + '.jpg'
ss = pd.read_csv(os.path.join(WORK_DIR, 'sample_submission.csv'))
test_images = '../input/ranzcr-clip-catheter-line-classification' + '/test/' + ss['StudyInstanceUID'] + '.jpg'
label_cols = ss.columns[1:]
labels = train[label_cols].values
train_annot = pd.read_csv(os.path.join(WORK_DIR, 'train_annotations.csv'))

sns.set_style('whitegrid')
fig = plt.figure(figsize=(15, 12), dpi=300)
plt.suptitle('Labels count', fontfamily='serif', size=15)
for ind, i in enumerate(label_cols):
    fig.add_subplot(4, 3, ind + 1)
    sns.countplot(train[i], edgecolor='black', palette=reversed(sns.color_palette('viridis', 2)))
    plt.xlabel('')
    plt.ylabel('')
    plt.xticks(fontfamily='serif', size=10)
    plt.yticks(fontfamily='serif', size=10)
    plt.title(i, fontfamily='serif', size=10)
plt.show()