Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Wednesday, July 13, 2016

installing #altair #python #conda

>conda install altair --channel conda-forge

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-4.1.8                |           py35_0         247 KB
    pandas-0.18.1              |      np110py35_0         6.9 MB  conda-forge
    vega-0.4.1                 |           py35_1         904 KB  conda-forge
    altair-1.0.0               |           py35_0         1.6 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         9.6 MB
Linking packages ...
[vega                ]|#########################                         |  50%
C:\Users\Userme>"C:\Users\Userme\AppData\Local\Continuum\Anaconda3\Scripts\jupyter-nbextension.exe" install vega --py --sys-prefix   && if errorlevel 1 exit 1

Just for my note
    To initialize this nbextension in the browser every time the notebook (or other app) loads:

          jupyter nbextension enable vega --py --sys-prefix

The documentation:
https://github.com/ellisonbg/altair

Tuesday, January 27, 2015

Variable Assignment in python

The deep copy versus the shallow copy example
# note the difference between a=b and a= b[:] a = [[1,2],[3,4]] b = a[:] #shallow copy b[1] = [4,5] print a,b ############## # now watch b=a b[1] = [4,5] print a,b # see the difference? Can you explain from this how the global objects are assigned in python? #This is a good excercise.