This is for the case where each data frame in the original list is formatted with the same columns (like it was produced in a loop...)
0 Comments
Sample Headline¶
Another headline (H2)¶This is a normal paragraph. Now for some Lorem Ipsum. Lorem ipsum dolor sit amet. Basic formatting of italics and bold is supported. This can be nested like so. What this notebook shows¶
In [18]:
'Hello World'
Out[18]:
'Hello World'
In [20]:
print('Hello World')
Hello World
In [23]:
%lsmagic
Out[23]:
Available line magics: %alias %alias_magic %autocall %automagic %autosave %bookmark %cat %cd %clear %colors %config %connect_info %cp %debug %dhist %dirs %doctest_mode %ed %edit %env %gui %hist %history %install_default_config %install_ext %install_profiles %killbgscripts %ldir %less %lf %lk %ll %load %load_ext %loadpy %logoff %logon %logstart %logstate %logstop %ls %lsmagic %lx %macro %magic %man %matplotlib %mkdir %more %mv %notebook %page %pastebin %pdb %pdef %pdoc %pfile %pinfo %pinfo2 %popd %pprint %precision %profile %prun %psearch %psource %pushd %pwd %pycat %pylab %qtconsole %quickref %recall %rehashx %reload_ext %rep %rerun %reset %reset_selective %rm %rmdir %run %save %sc %set_env %store %sx %system %tb %time %timeit %unalias %unload_ext %who %who_ls %whos %xdel %xmode Available cell magics: %%! %%HTML %%SVG %%bash %%capture %%debug %%file %%html %%javascript %%latex %%perl %%prun %%pypy %%python %%python2 %%python3 %%ruby %%script %%sh %%svg %%sx %%system %%time %%timeit %%writefile Automagic is ON, % prefix IS NOT needed for line magics.
In [27]:
%pwd
Out[27]:
'/Users/garylarson/foo'
In [31]:
%ls -la
total 16 drwxr-xr-x 4 garylarson staff 136 Nov 21 09:01 ./ drwxr-xr-x+ 150 garylarson staff 5100 Nov 21 08:34 ../ drwxr-xr-x 3 garylarson staff 102 Nov 21 08:51 .ipynb_checkpoints/ -rw-r--r-- 1 garylarson staff 7788 Nov 21 09:01 Testing Jupyter.ipynb
In [40]:
%matplotlib inline
In [41]:
import numpy as np
import matplotlib.pyplot as plt
N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses
plt.scatter(x,y, s = area, c = colors, alpha=0.5)
plt.show
Out[41]:
<function matplotlib.pyplot.show>
In [45]:
%%timeit
square_evens = [n*n for n in range(1000)]
The slowest run took 4.50 times longer than the fastest. This could mean that an intermediate result is being cached. 1000 loops, best of 3: 264 µs per loop
In [48]:
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.rand(10,5))
df.head()
Out[48]:
In [ ]:
After installing Anaconda python in hopes to learn some python via iPython notebooks, I found that the most basic commands (like starting the navigator / new notebook / etc) did not work from the Terminal. I was getting all sorts of confused about what was going on. The problem was simple:
Anaconda's installation does set all the paths properly, but the problem is using fish as the default shell. Because I'm not using bash as the default shell, I don't get access to any of the PATHs that are set by ~/.bash_profile! One option would be to try manually setting all those environment variables in fish.config (or whatever it's called) but that seems like a pain. Another option, from here, it to try this: "Keep your default shell as Bash and simply add the line exec fish to the appropriate Bash#Configuration files," I did that - adding exec fish to the end of ~/.bash_profile, and changed back to bash as the default shell. Now, when opening a new terminal window, fish opens and running which python finally gives me /Users/garylarson/anaconda/bin/python. |
Categories
All
Archives
December 2016
AboutThis blog is mainly for statistics, R, or Duke-related stuff that is not directly relating to research activity. |