回答編集履歴
1
追記
test
CHANGED
@@ -21,3 +21,37 @@
|
|
21
21
|
4 Minnie F 1746 1880
|
22
22
|
|
23
23
|
```
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
---
|
28
|
+
|
29
|
+
【追記】
|
30
|
+
|
31
|
+
jupyter notebookの場合
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
import sys
|
36
|
+
|
37
|
+
import pandas as pd
|
38
|
+
|
39
|
+
import argparse
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
parser = argparse.ArgumentParser()
|
44
|
+
|
45
|
+
parser.add_argument('--row','-r')
|
46
|
+
|
47
|
+
args = parser.parse_args(args=['-r','5'])
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
n = int(args.row)
|
52
|
+
|
53
|
+
df = pd.read_csv('https://nlp100.github.io/data/popular-names.txt', sep='\t', header=None)
|
54
|
+
|
55
|
+
print(df.head(n))
|
56
|
+
|
57
|
+
```
|