In [15]:
Copied!
import numpy as np
import pandas as pd
import numpy as np
import pandas as pd
In [16]:
Copied!
dates = pd.date_range('20130101', periods=6)
df = pd.DataFrame(np.random.randn(6, 4), index=dates, columns=list('ABCD'))
df
dates = pd.date_range('20130101', periods=6)
df = pd.DataFrame(np.random.randn(6, 4), index=dates, columns=list('ABCD'))
df
Out[16]:
A | B | C | D | |
---|---|---|---|---|
2013-01-01 | 0.964615 | 0.499607 | 0.861751 | 1.019190 |
2013-01-02 | 0.655980 | -0.773237 | -0.828954 | 0.853228 |
2013-01-03 | 0.664080 | -0.521969 | 2.215162 | -0.806104 |
2013-01-04 | -0.621929 | 1.511482 | -0.908521 | -3.043326 |
2013-01-05 | -1.114458 | -0.385777 | 2.176734 | -0.345221 |
2013-01-06 | 0.948003 | -2.841823 | -0.135223 | -0.307160 |
shell¶
In [17]:
Copied!
%%script bash
echo "这是 git 的提交历史"
echo "请在shell有bash的条件下执行"
git reflog
%%script bash
echo "这是 git 的提交历史"
echo "请在shell有bash的条件下执行"
git reflog
这是 git 的提交历史 请在shell有bash的条件下执行 7173168 HEAD@{0}: commit: Fix an error in Logic 5e352b3 HEAD@{1}: commit: Logic Notes Modification 0e7750c HEAD@{2}: commit: Logic Notes Update 7422b7e HEAD@{3}: commit: Real analysis update 94e51d4 HEAD@{4}: commit: Set theory and logic update de3982d HEAD@{5}: commit: Probability Theory Notes Update ac44f4d HEAD@{6}: clone: from https://github.com/xiong-ZH-zq/xzqbear-blogs.git
JS¶
In [18]:
Copied!
%%script js
console.log("这里是 Javascript 执行内容")
%%script js
console.log("这里是 Javascript 执行内容")
这里是 Javascript 执行内容