我有一组数据需要以直方图的形式呈现。当我使用numpy.histogram时,沿x轴的值将使用Eulers数字,这会适得其反。如何将这些数字转换回普通数字?数字很大,有几千万。
I haven't tried researching how Eulers number is used to try and write my own code to reverse it, but I haven't found anything
from bokeh.plotting import output_file, figure, show
import numpy as np
from excelParser import parseExcelFile #custom method for parsing excel data
from math import exp
rawData = parseExcelFile("histogram-data.xlsx", False) #gets the data
filteredData = []
#filters the data
for key in rawData:
filteredData.append(rawData[key]['total_revenue'] / 1000000)
histData = np.histogram(filteredData, bins='scott') #calculates histogram data
print(histData[1])
结果:
[1.00000000e-03 2.36480474e+00 4.72860948e+00 7.09241422e+00
9.45621896e+00 1.18200237e+01 1.41838284e+01 1.65476332e+01
1.89114379e+01 2.12752427e+01 2.36390474e+01 2.60028521e+01
2.83666569e+01 3.07304616e+01 3.30942663e+01 3.54580711e+01
3.78218758e+01 4.01856806e+01 4.25494853e+01 4.49132900e+01
4.72770948e+01 4.96408995e+01 5.20047043e+01 5.43685090e+01]