pandas histogram plot error: ValueError: num must be 1 <= num <= 0, not 1

痴心易碎 提交于 2019-11-30 19:43:48

问题


I am drawing a histogram of a column from pandas data frame:

%matplotlib notebook
import matplotlib.pyplot as plt
import matplotlib
df.hist(column='column_A', bins = 100)

but got the following errors:

     62                     raise ValueError(
     63                         "num must be 1 <= num <= {maxn}, not {num}".format(
---> 64                             maxn=rows*cols, num=num))
     65                 self._subplotspec = GridSpec(rows, cols)[int(num) - 1]
     66                 # num - 1 for converting from MATLAB to python indexing

ValueError: num must be 1 <= num <= 0, not 1

Does anyone know what this error mean? Thanks!

来源:https://stackoverflow.com/questions/39581525/pandas-histogram-plot-error-valueerror-num-must-be-1-num-0-not-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!