1
1
New features
2
2
------------
3
3
4
- * implemented a new describe() method on arrays to give quick summary statistics (excluding NaN values). By default,
5
- it includes the number of values, mean, standard deviation, minimum, 25, 50 and 75 percentiles and maximum.
4
+ * viewer: added a menu bar with the ability to clear the current session, save all its arrays to a file (.h5, .xlsx,
5
+ .pkl or a directory containing multiple .csv files), and load arrays from such a file (closes :issue:`88 `).
6
+
7
+ WARNING: Only array objects are currently saved. It means that scalars, functions or others non-LArray objects
8
+ defined in the console are *not* saved in the file.
9
+
10
+ * implemented a new describe() method on arrays to give quick summary statistics. By default, it includes the number of
11
+ non-NaN values, the mean, standard deviation, minimum, 25, 50 and 75 percentiles and maximum.
6
12
7
13
>>> arr = ndrange(' gender=Male,Female;year=2014..2020' ).astype(float )
8
14
>>> arr
13
19
statistic | count | mean | std | min | 25% | 50% | 75% | max
14
20
| 14.0 | 6.5 | 4.031128874149275 | 0.0 | 3.25 | 6.5 | 9.75 | 13.0
15
21
16
- an optional keyword argument allow to specify different percentiles to include
22
+ an optional keyword argument allows to specify different percentiles to include
17
23
18
24
>>> arr.describe(percentiles=[20 , 40 , 60 , 80 ])
19
25
statistic | count | mean | std | min | 20% | 40% | 60% | 80% | max
34
40
35
41
This closes :issue:`184`.
36
42
37
- * implemented reindex allowing to change order of labels ( and add new ones) of one or several axes:
43
+ * implemented reindex allowing to change the order of labels and add/remove some of them to one or several axes:
38
44
39
45
>>> arr = ndtest((2 , 2 ))
40
46
>>> arr
52
58
a1 | -1 | 3 | 2
53
59
a2 | -1 | -1 | -1
54
60
a0 | -1 | 1 | 0
61
+
62
+ using reindex one can make an array compatible with another array which has more/less labels or with labels in a
63
+ different order:
64
+
55
65
>>> arr2 = ndtest((3 , 3 ))
56
- >>> arr.reindex( arr2.axes, fill_value=- 1 )
66
+ >>> arr2
57
67
a\\b | b0 | b1 | b2
58
- a0 | 0 | 1 | -1
59
- a1 | 2 | 3 | -1
60
- a2 | -1 | -1 | -1
68
+ a0 | 0 | 1 | 2
69
+ a1 | 3 | 4 | 5
70
+ a2 | 6 | 7 | 8
71
+ >>> arr.reindex(arr2.axes, fill_value=0 )
72
+ a\\b | b0 | b1 | b2
73
+ a0 | 0 | 1 | 0
74
+ a1 | 2 | 3 | 0
75
+ a2 | 0 | 0 | 0
76
+ >>> arr.reindex(arr2.axes, fill_value=0 ) + arr2
77
+ a\\b | b0 | b1 | b2
78
+ a0 | 0 | 2 | 2
79
+ a1 | 5 | 7 | 5
80
+ a2 | 6 | 7 | 8
61
81
62
82
This closes :issue:`18`.
63
83
85
105
86
106
* viewer: added possibility to delete an array by pressing Delete on keyboard (closes :issue:`116 `).
87
107
88
- * viewer: added a menu bar 'File' with options 'New', 'Open', 'Save', 'SaveAs', 'Open Recent' and 'Quit'.
89
-
90
- WARNING: Only LArray objects are saved.
91
-
92
- (closes :issue:`88 `)
93
-
94
- * renamed dump, dump_hdf, dump_excel and dump_csv methods of class Session as save, to_hdf, to_excel and to_csv
95
- (closes :issue:`217 `)
96
108
97
109
.. _misc:
98
110
@@ -108,6 +120,8 @@ Miscellaneous improvements
108
120
109
121
(closes :issue:`152 `)
110
122
123
+ * renamed Session.dump, dump_hdf, dump_excel and dump_csv to save, to_hdf, to_excel and to_csv (closes :issue:`217 `).
124
+
111
125
* changed default value of `ddof` argument for var and std functions from 0 to 1 (closes :issue:`190 `).
112
126
113
127
* implemented a new syntax for stack(): `stack({label1: value1, label2: value2}, axis)`
@@ -193,6 +207,16 @@ Miscellaneous improvements
193
207
Axis([' c0' , ' c1' , ' c2' ], ' column' )
194
208
])
195
209
210
+ * added possibility to delete an array from a session:
211
+
212
+ >>> s = Session({' a' : ndtest ((3 , 3 )), ' b' : ndtest ((2 , 4 )), ' c' : ndtest ((4 , 2 ))})
213
+ >>> s.names
214
+ ['a', 'b', 'c']
215
+ >>> del s.b
216
+ >>> del s['c']
217
+ >>> s.names
218
+ ['a']
219
+
196
220
* made create_sequential axis argument accept axis definitions in addition to Axis objects like, for example, using a
197
221
string definition (closes :issue:`160 `).
198
222
@@ -222,30 +246,22 @@ Miscellaneous improvements
222
246
223
247
will autocomplete to `s.a_nice_test_array` and `s['a_<tab>` will be completed to `s['a_nice_test_array`
224
248
225
- * added possibility to delete an array from a session:
226
-
227
- >>> s = Session({' a' : ndtest ((3 , 3 )), ' b' : ndtest ((2 , 4 )), ' c' : ndtest ((4 , 2 ))})
228
- >>> s.names
229
- ['a', 'b', 'c']
230
- >>> del s.b
231
- >>> del s['c']
232
- >>> s.names
233
- ['a']
234
-
235
249
* made warning messages for division by 0 and invalid values (usually caused by 0 / 0 ) point to the user code line,
236
250
instead of the corresponding line in the larray module.
237
251
252
+ * preserve order of arrays in a session when saving to/loading from an .xlsx file.
253
+
254
+ * when creating a session from a directory containing CSV files, the directory may now contain other (non-CSV) files.
255
+
238
256
239
257
Fixes
240
258
-----
241
259
242
260
* fixed keyword arguments such as `out`, `ddof`, ... for aggregation functions (closes :issue:`189 `).
243
261
244
- * fixed percentile(_by) with multiple percentiles values (i.e. when argument `q` is a list/tuple).
245
- (closes :issue:`192 `)
262
+ * fixed percentile(_by) with multiple percentiles values, i.e. when argument `q` is a list/tuple (closes :issue:`192 `).
246
263
247
- * fixed group aggregates on integer arrays for median, percentile, var and std
248
- (closes :issue:`193 `).
264
+ * fixed group aggregates on integer arrays for median, percentile, var and std (closes :issue:`193 `).
249
265
250
266
* fixed group sum over boolean arrays (closes :issue:`194 `).
251
267
@@ -259,8 +275,4 @@ Fixes
259
275
* fixed Workbook behavior in case of new workbook: the first added sheet replaces the default sheet `Sheet1`
260
276
(closes :issue:`230 `).
261
277
262
- * fixed order of arrays in sessions loaded from files. The order is now the same as in the file.
263
-
264
- * fixed loading session from CSV files in a directory. The directory may contain other non-csv files.
265
-
266
278
* fixed with_axes warning to refer to set_axes instead of replace_axes.
0 commit comments