20 lines
557 B
Python
20 lines
557 B
Python
import pandas as pd
|
|
import matplotlib.pyplot as plt
|
|
|
|
data = {
|
|
'_id': [4369, 819, 3952, 395, 3954],
|
|
'classificationResult': ['Sickle Cell Trait', 'Normal', 'Sickle Cell Disease', 'Sickle Cell Disease', 'Sickle Cell Disease'],
|
|
'deviceRatio': [0.3137193, 0.4029867, 0.5270785, 0.479178, 0.4949574]
|
|
}
|
|
|
|
df = pd.DataFrame(data)
|
|
|
|
box_plot = df.boxplot(column='deviceRatio', by='classificationResult', vert=True)
|
|
|
|
plt.title('Box Plot of Device Ratio by Classification Result')
|
|
plt.xlabel('Classification Result')
|
|
plt.ylabel('Device Ratio')
|
|
|
|
plt.show()
|
|
|