data = {'Merchant': [1, 0, 1, 0], 'Non-Merchant': [0, 1, 0, 1],
    'Num of Chats Received': [80, 60, 70, 50], 'Num of Chats Made': [50, 30,
    40, 20]}
df = pd.DataFrame(data)
merchant_chats_made = list(df[df['Merchant'] == 1]['Num of Chats Made'])
merchant_chats_received = list(df[df['Merchant'] == 1]['Num of Chats Received']
    )
non_merchant_chats_made = list(df[df['Non-Merchant'] == 1]['Num of Chats Made']
    )
non_merchant_chats_received = list(df[df['Non-Merchant'] == 1][
    'Num of Chats Received'])
output_file('merchant.html')
p = figure(plot_width=400, plot_height=400)
p.circle(merchant_chats_made, merchant_chats_received, size=10, color='red',
    alpha=0.5, legend='Merchant')
p.circle(non_merchant_chats_made, non_merchant_chats_received, size=10,
    color='blue', alpha=0.5, legend='Non-Merchant')
p.xaxis.axis_label = 'Chats Made'
p.yaxis.axis_label = 'Chats Received'
p.legend.location = 'top_left'
show(p)
Как мне построить диаграмму рассеяния с категориальными данными, используя Bokeh и Pandas?