質問編集履歴
4
改善
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
python d
|
1
|
+
python decimalでcsvを読みこみたい
|
test
CHANGED
File without changes
|
3
改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,6 +40,10 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
+
![イメージ説明](7a5c83262201043f3b42c6755e875a68.png)
|
44
|
+
|
45
|
+
|
46
|
+
|
43
47
|
##作成したコード
|
44
48
|
|
45
49
|
```
|
@@ -80,6 +84,10 @@
|
|
80
84
|
|
81
85
|
np.savetxt('deimal test_200_23104-30804_history.csv', list, delimiter=',')
|
82
86
|
|
87
|
+
|
88
|
+
|
89
|
+
## 1_23104-30804_history.csv
|
90
|
+
|
83
91
|
```
|
84
92
|
|
85
93
|
timestep
|
2
改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,9 +28,15 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
-
decimalを使用すればよいとのことなのですが,
|
31
|
+
decimalを使用すればよいとのことなのですが,
|
32
|
+
|
32
|
-
|
33
|
+
私の書いたコードではエラーが出るのですが
|
34
|
+
|
33
|
-
|
35
|
+
これは何がいけないのでしょうか?
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
素人のためあまりわかっていません.すいません.勉強中です.
|
34
40
|
|
35
41
|
|
36
42
|
|
@@ -42,19 +48,23 @@
|
|
42
48
|
|
43
49
|
import pandas as pd
|
44
50
|
|
51
|
+
from decimal import Decimal
|
52
|
+
|
45
|
-
data = pd.read_csv("1_1-
|
53
|
+
data = pd.read_csv("1_23104-30804_history.csv").values.tolist()
|
54
|
+
|
55
|
+
decimaldata = Decimal("data")
|
46
56
|
|
47
57
|
|
48
58
|
|
49
59
|
list = []
|
50
60
|
|
51
|
-
filterrange =
|
61
|
+
filterrange = Decimal("8.0")
|
52
|
-
|
62
|
+
|
53
|
-
deltax =
|
63
|
+
deltax = Decimal("2.0")
|
54
|
-
|
64
|
+
|
55
|
-
deltay =
|
65
|
+
deltay = Decimal("2.0")
|
56
|
-
|
66
|
+
|
57
|
-
a = filterrange*filterrange/24
|
67
|
+
a = filterrange*filterrange/Decimal("24.0")
|
58
68
|
|
59
69
|
|
60
70
|
|
@@ -68,13 +78,7 @@
|
|
68
78
|
|
69
79
|
|
70
80
|
|
71
|
-
np.savetxt('
|
81
|
+
np.savetxt('deimal test_200_23104-30804_history.csv', list, delimiter=',')
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
##1_1-7701_history.csv(Notepadで開いたもの)
|
78
82
|
|
79
83
|
```
|
80
84
|
|
1
改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
-
d
|
31
|
+
decimalを使用すればよいとのことなのですが,この場合は
|
32
32
|
|
33
33
|
どうやってdicimalで読み込めますか?
|
34
34
|
|