text_html_output_2.png text_html_output_1.png text_plain_output_2.png text_plain_output_1.png
import os

import pandas as pd

data_path = '/kaggle/input/covidx9a/'
images_path = '/kaggle/input/covidx-cxr2/train/'
data_file = 'train_COVIDx9A.txt'
train = pd.read_csv(os.path.join(data_path, data_file), header=None, sep=' ')
train.columns = ['patient id', 'filename', 'class', 'data source']

print('Classes:\n', train['class'].unique())
print('Data sources:\n', train['data source'].unique())
print('---------------------------------')
print('No. of unique patients:', train['patient id'].nunique(), 'out of', train.shape[0], 'images.')