IPython:一种交互式计算和开发环境

IPython基础

可以通过命令行启动IPython,执行任何Python语句,只需将其输入然后回车。

Tab键自动完成

在Shell中输入表达式时,只要按下Tab键,当前命名空间中任何与已输入的字符串相匹配的变量(对象,函数等)就会被找出来

也可以在任何对象后面输入一个句点以便自动完成方法和属性的输入:

Tab键自动完成功能不止可以用于搜索命名空间和自动完成对象或模块属性。当你输入任何看上去像是文件路径的东西时(即使是在一个Python字符串中),按下Tab键即可找出电脑文件系统中与之匹配的东西

内省

在变量的前面或后面加上一个问号(?)就可以将有关该对象的一些通用信息显示出来

如果该对象是一个函数或实例方法,则其docstring(如果有的话)也会被显示出来,用??可以显示源代码

?还有一个用法,即搜索IPython命名空间,类似于UNIX或Windows命令行中的那种用法。

一些字符再配以通配符(*)即可显示出所有与该通配符表达式相匹配的名称。

例如,可以列出NumPy顶级命名空间中含有"load"的所有函数

l

转载于:https://www.cnblogs.com/zuoyou151/p/9360185.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
We are becoming awash in the flood of digital data from scientific research, engineering, economics, politics, journalism, business, and many other domains. As a result, analyzing, visualizing, and harnessing data is the occupation of an increasingly large and diverse set of people. Quantitative skills such as programming, numerical computing, mathematics, statistics, and data mining, which form the core of data science, are more and more appreciated in a seemingly endless plethora of fields. Python, a widely-known programming language, is also one of the leading open platforms for data science. IPython is a mature Python project that provides scientist-friendly interactive access to Python. It is part of the broader Project Jupyter, which aims to provide high-quality environments for interactive computing, data analysis, visualization, and the authoring of interactive scientific documents. Jupyter is estimated to have several million users today. The prequel of this book, Learning IPython for Interactive Computing and Data Visualization Second Edition, Packt Publishing was published in 2015, two years after the first edition. It is a beginner-level introduction to data science and numerical computing with Python, IPython, and Jupyter. This book, the first edition of which was published in 2014, continues that journey by presenting more than 100 recipes for interactive scientific computing and data science. These recipes not only cover programming topics such as numerical computing, high-performance computing, parallel computing, and interactive visualization, but also data analysis topics such as statistics, data mining, machine learning, signal processing, graph theory, numerical optimization, and many others. This second edition is fully compatible with the latest versions of the platform and its libraries. It includes new recipes to better leverage the latest features of Python 3, and it introduces promising new projects such as JupyterLab, Altair, and Dask.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值