Seaborn boxplot with dataframe containting quantiles

Solution for Seaborn boxplot with dataframe containting quantiles
is Given Below:

If I have a data frame with known quantiles, can I make Seaborn boxplot show the little diamonds on each percentile?

test = pd.DataFrame(
    {
        "id": ["A", "A", "A", "B", "B", "B", "C", "C", "C"],
        "q": [0.16, 0.5, 0.84, 0.16, 0.5, 0.84, 0.16, 0.5, 0.84],
        "value": [0.2, 0.56, 0.84, 0.14, np.nan, 0.78, 0.125, 0.4, 0.62],
    }
)

display(test)
sns.boxplot(data=test, x="value", y="id")

enter image description here

maybe this helps you:

import seaborn as sns
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt


test = pd.DataFrame(
    {
        "id": ["A", "A", "A", "B", "B", "B", "C", "C", "C"],
        "q": [0.16, 0.5, 0.84, 0.16, 0.5, 0.84, 0.16, 0.5, 0.84],
        "value": [0.2, 0.56, 0.84, 0.14, np.nan, 0.78, 0.125, 0.4, 0.62],
    }
)

display(test)
g = sns.boxplot(data=test, x="value", y="id")

    
for index, row in test.iterrows():
    if(row['id']=='A'):
        g.plot((row['q']), (row['id']), 'o', color="y")
    if(row['id']=='B'):
        g.plot((row['q']), (row['id']), 'o', color="b")        
    if(row['id']=='C'):
        g.plot((row['q']), (row['id']), 'o', color="r")
        
plt.show()

output:
enter image description here