为了规范化pandas DataFrame中的数据,我编写了以下函数:
def zscore(data):
data = (data - data.mean())/data.std(ddof=0)
return data
def normalize(x):
return (x - x.min(axis=0)) / (x.max(axis=0) - x.min(axis=0))
但是当我给他们打电话时,我收到以下警告:
/usr/lib/python2.7/dist-packages/numexpr/necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
return compiled_ex(*arguments, **kwargs)
/usr/lib/python2.7/dist-packages/numexpr/necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
return compiled_ex(*arguments, **kwargs)
/usr/lib/python2.7/dist-packages/numexpr/necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
return compiled_ex(*arguments, **kwargs)
我无法理解这是什么意思!是否可能影响结果?我在数据集X
上调用这些函数,其中X.shape == (102819, 301)
和type(X) == <class 'pandas.core.frame.DataFrame'>
包含所有浮点值。