2020-08-13 12:00:20 +02:00
|
|
|
|
---
|
|
|
|
|
id: 5e9a093a74c4063ca6f7c163
|
2021-07-15 13:04:11 +05:30
|
|
|
|
title: 从数据库中读取数据
|
2020-08-13 12:00:20 +02:00
|
|
|
|
challengeType: 11
|
|
|
|
|
videoId: MtgXS1MofRw
|
2021-10-04 07:27:38 -07:00
|
|
|
|
bilibiliIds:
|
|
|
|
|
aid: 890546354
|
|
|
|
|
bvid: BV1JP4y1h7gk
|
|
|
|
|
cid: 409020851
|
2021-01-13 03:31:00 +01:00
|
|
|
|
dashedName: reading-data-from-databases
|
2020-08-13 12:00:20 +02:00
|
|
|
|
---
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --description--
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
*在视频中我们使用的编辑器工具是在 notebook.ai 这个平台,你也可以选择用其他的平台,比如说 Google Colab 也是一个不错的选择。*
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
以下有更多的资料
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
2021-10-04 07:27:38 -07:00
|
|
|
|
- [在 GitHub 平台的 Notebooks](https://github.com/krishnatray/RDP-Reading-Data-with-Python-and-Pandas)
|
2021-07-15 13:04:11 +05:30
|
|
|
|
- [如何使用 Google Colab 来打开 GitHub 上的 Notebooks](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
|
|
|
|
# --question--
|
|
|
|
|
|
|
|
|
|
## --text--
|
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
`Cursor` 实例中都有什么方法,这些方法能用来做什么?
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
|
|
|
|
## --answers--
|
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
`Cursor` 实例中有方法 `.run()` ,它允许你运行 SQL 查询语句。
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
`Cursor` 实例中有方法 `.select()` ,它允许你选择记录。
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
`Cursor` 实例有方法 `.execute()` , 它能够接收在数据库中运行的 SQL 参数。
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
|
|
|
|
## --video-solution--
|
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|