回答編集履歴
1
add
answer
CHANGED
@@ -1,4 +1,26 @@
|
|
1
1
|
X = setosa[["SepalLength"]]
|
2
2
|
を
|
3
3
|
X = setosa["SepalLength"]
|
4
|
-
にしてみてはいかがでしょう。
|
4
|
+
にしてみてはいかがでしょう。
|
5
|
+
|
6
|
+
---
|
7
|
+
|
8
|
+
```python
|
9
|
+
import numpy as np
|
10
|
+
import pandas as pd
|
11
|
+
n = 10
|
12
|
+
b = pd.DataFrame(np.random.randint(4, size=(n, 2)))
|
13
|
+
b.columns = ['a','b']
|
14
|
+
b.index = np.array([str(i) for i in b.index])
|
15
|
+
print(b)
|
16
|
+
|
17
|
+
c = b[['a']]
|
18
|
+
d = b[['b']]
|
19
|
+
a = np.arange(c.min()[0], d.max()[0], 0.1)[:, np.newaxis]
|
20
|
+
print(a)
|
21
|
+
|
22
|
+
c = b['a']
|
23
|
+
d = b['b']
|
24
|
+
a = np.arange(c.min(), c.max(), 0.1)[:, np.newaxis]
|
25
|
+
print(a)
|
26
|
+
```
|