Skip to Content
Python数据科学手册
book

Python数据科学手册

by Jake VanderPlas
January 2018
Intermediate to advanced
470 pages
13h 23m
Chinese
Posts & Telecom Press
Content preview from Python数据科学手册
8
|
第
1
章
快捷键 动作
Backspace
键 删除前一个字符
Ctrl + d
删除后一个字符
Ctrl + k
从光标开始剪切至行的末尾
Ctrl + u
从行的开头剪切至光标
Ctrl + y yank
(即粘贴)之前剪切的文本
Ctrl + t transpose
(即交换)前两个字符
1.3.3
 命令历史快捷键
可能本书讨论的最有效的快捷方式是
IPython
提供的导航命令历史的快捷方式。这个命令
历史超越了你当前的
IPython
会话——你所有的命令历史都会存储在一个
IPython
配置文件
路径下的
SQLite
数据库中。获取这些命令最直接的方式就是用上下箭头遍历历史,但是仍
然还有些别的选项。
快捷键 动作
Ctrl + p
(或向上箭头)
获取前一个历史命令
Ctrl + n
(或向下箭头) 获取后一个历史命令
Ctrl + r
对历史命令的反向搜索
反向搜索特别有用。在前一节中,我们定义了一个叫作
square
的函数。让我们从一个新的
IPython shell
中反向搜索
Python
历史,重新找到这个函数的定义。当你在
IPython
终端按
下
Ctrl + r
键时,将看到如下提示:
In [1]:
(reverse-i-search)`':
如果你在该提示后开始输入字符,
IPython
将自动填充时间最近的命令。如果有的话,将
会匹配到如下字符:
In [1]:
(reverse-i-search)`sqa': square??
你可以随时添加更多的字符来重新定义搜索,或者再一次按下
Ctrl + r
键来寻找另外一个
匹配该查询的命令。如果你在前一节中照做了的话,按下 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

流畅的Python

流畅的Python

Luciano Ramalho
Python数据分析基础

Python数据分析基础

Clinton W. Brownley
Python数据处理

Python数据处理

Jacqueline Kazil, Katharine Jarmul

Publisher Resources

ISBN: 9787115475893