Python函数前面的感叹号

时间:2013-10-30 19:26:22

标签: python python-2.7 pandas

!之类的Python函数前面有感叹号head时,这是什么意思?

示例

aapl.to_csv('aapl.csv')
!head aapl.csv

使用head aapl.csv会引发invalid syntax错误。

1 个答案:

答案 0 :(得分:5)

您正在使用Ipython,它使用此!command语法来运行系统命令。 http://ipython.org/ipython-doc/stable/interactive/tutorial.html#system-shell-commands

相关问题