Essential knowledge Flashcards

1
Q

(For NYJC Exams only)
What is the Powershell command to launch Jupyter Notebook in E: drive?

A

cd E:
jupyter notebook

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to rename a file in File Explorer (without using right click)?

A

From menu, Home –> Rename

or

Use F2 shortcut key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the shortcut key to delete a cell in Jupyter Notebook?

A

Select a cell first. Then press D, D (press D twice)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the shortcut key to insert a cell in Jupyter Notebook?

A

A to insert above current cell

B to insert below current cell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to show line numbers in Jupyter Notebook?

A

Under the View menu, click “Toggle Line Numbers”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to show line numbers in IDLE?

A

You can’t; the version of IDLE in the SSOE laptops does not support line numbers. Edit in Notepad++ and copy back instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to access the extended clipboard in Windows?

A

Win+V (hold Windows key, press V)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The minimal Python code to read in a csv file (with header) is:

A

import csv
data = []
with open(filename, ‘r’) as f:
for row in csv.DictReader(f):
data.append(row)
# f.close() is automatically called
# data is a list of dicts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The minimal Python code to read in a csv file (without header) is:

A

import csv
data = []
with open(filename, ‘r’) as f:
for row in csv.reader(f):
data.append(row)
# f.close() is automatically called
# data is a list of tuples

How well did you know this?
1
Not at all
2
3
4
5
Perfectly