1

In order to normalize data in a pandas DataFrame I wrote the following functions:

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))

but when I call each of them I get the following warning:

/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)

I can't understand what this is about! Is it likely to affect the results or not? I am calling these functions on a dataset X where X.shape == (102819, 301) and type(X) == <class 'pandas.core.frame.DataFrame'>, which consists of all float values.

ali_m
  • 71,714
  • 23
  • 223
  • 298
Talia
  • 2,947
  • 4
  • 17
  • 28
  • related: http://stackoverflow.com/q/23458055/1461210 – ali_m Oct 29 '15 at 21:52
  • I am trying to install numexpr as the related but whatever i try i give errors and it doesn't install completely – Talia Oct 30 '15 at 12:33
  • If you want help with the errors you are seeing then you will have to show them in your question. – ali_m Oct 30 '15 at 17:34
  • with conda update -n p33 numexpr i give command not found. I installed numexpr by using sudo apt-get install python-numexpr successfully but error exists yet. – Talia Nov 01 '15 at 13:43
  • I used "python -c "import numexpr; numexpr.test()" to test and it is working. – Talia Nov 01 '15 at 13:52
  • It sounds as though the problem is that you have installed some packages locally through Anaconda and others system-wide using `apt-get`. Anaconda is a self-contained Python environment - if you want to install or update packages with Anaconda then you will need to use `conda` rather than `apt-get`. It's unclear to me whether `python` refers to your system-wide version of Python or to the one from Anaconda. What is the output of `which python`? – ali_m Nov 01 '15 at 13:58
  • This is the result of which python: "/usr/bin/python" – Talia Nov 01 '15 at 14:03
  • OK, that is the problem. `/usr/bin/python` is your system-wide Python binary. Your Anaconda Python is usually in `$HOME/anaconda/bin/`. In order to use Anaconda by default instead of the system-wide Python you would usually prepend your `$PATH` with the Anaconda `bin` directory, e.g. by adding the line `PATH="$HOME/anaconda/bin:$PATH` to your `$HOME/.bashrc` file. [See here](http://docs.continuum.io/anaconda/install#linux-install). – ali_m Nov 01 '15 at 14:09
  • I didn't get what i have to do now. Do i have to write:" PATH="$HOME/anaconda/bin:$PATH" in terminal and then "conda update -n p33 numexpr" ? – Talia Nov 01 '15 at 14:17
  • In your current terminal session you could type `export PATH=$HOME/anaconda/bin:$PATH`, then `which python` should print something like `/home//anaconda/bin/python`, which means that you are now using the Anaconda Python environment rather than the system-wide one. That change will only be for the current terminal session, though. To make the change permanent you could edit the file called `.bashrc` in your home directory, and add the line `export PATH=$HOME/anaconda/bin:$PATH` to it. Then you would use `conda` to install/update whatever packages you need. – ali_m Nov 01 '15 at 14:27
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/93916/discussion-between-talia-and-ali-m). – Talia Nov 01 '15 at 14:32

0 Answers0