如何在python中分辨直方图bin的边界值

数据是从另一个数据框中提取的列。

import tkinter as tk
import tkinter.ttk as ttk

#DICTIONARIES#
weapondict = {"Bronze Sword": {"atk":32,"def":4},"iron Sword": {"atk":47,"def":5}}
shielddict = {"Bronze Shield": {"atk":3,"def":10},"iron Shield": {"atk":5,"def":27}}

#FUNCTION#
def selected(func):
    a = weapondict[weaponvar.get()]["atk"]
    b = shielddict[shieldvar.get()]["atk"]
    atkvar.set(a + b)
    c = weapondict[weaponvar.get()]["def"]
    d = shielddict[shieldvar.get()]["def"]
    defvar.set(c + d)

#WINDOWLOOP#
root = tk.Tk()
root.geometry("250x125")

#VARIABLES#
weaponvar = tk.StringVar()
shieldvar = tk.StringVar()
atkvar = tk.IntVar()
defvar = tk.IntVar()

#COMBOBOXES#
weaponbox = ttk.Combobox(root,height=5,state="readonly",values=list(weapondict.keys()),textvariable=weaponvar)
weaponbox.place(x=10,y=10,width=130)
weaponbox.bind('<<ComboboxSelected>>',func=selected)

shieldbox = ttk.Combobox(root,values=list(shielddict.keys()),textvariable=shieldvar)
shieldbox.place(x=10,y=70,width=130)
shieldbox.bind('<<ComboboxSelected>>',func=selected)

#LABELS#
atklabel = tk.Label(root,text='Atk Bonus:')
atklabel.place(x=150,width=70,height=20)

deflabel = tk.Label(root,text='Def Bonus:')
deflabel.place(x=150,height=20)

atktotal = tk.Label(root,textvariable=atkvar)
atktotal.place(x=155,y=30,width=100,height=20)

deftotal = tk.Label(root,textvariable=defvar)
deftotal.place(x=155,y=90,height=20)

root.mainloop()

以下是代码为 Result 0 29 1 1 2 1 3 22 4 370 ... ... 916 42 917 1 918 2200 919 200 920 770 的图形

如何在python中分辨直方图bin的边界值

基本上,我想在第一个容器的df.hist()上找到边界值,以便将其与其余容器分开。我怎样才能做到这一点?

j5210 回答:如何在python中分辨直方图bin的边界值

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3120407.html

大家都在问