Fit a gaussian function

后端 未结 4 478
天命终不由人
天命终不由人 2020-11-30 02:20

I have a histogram (see below) and I am trying to find the mean and standard deviation along with code which fits a curve to my histogram. I think there is something in SciP

4条回答
  •  旧时难觅i
    2020-11-30 02:30

    Kind of an old question, but for anybody looking just to plot a density fit for a series, you could try matplotlib's .plot(kind='kde'). Docs here.

    Example with pandas:

    mydf.x.plot(kind='kde')
    

提交回复
热议问题