Commit ef1e32f
authored
Fix the issue that the maximum width of the column does not change when a format is applied to the column (#86)
* Improve the speed of displaying large datasets in Jupyter Notebook
Fix the issue that Jupyter Notebook takes too much time when displaying large datasets with many columns.
The getmaxwidths() function now only calculates the maximum width of the columns that will be displayed, not all columns.
Please see issue for more details.
* Modify the initialization code of maxwidths
Now might break the loop before filling all the values of maxwidths.
The initialize code of maxwidths has been modified.
* Fix the issue that the maximum width of the column does not change when a format is applied to the column
When the getmaxwidth() function calculates the maximum width of a column, the format is not applied to the column. When the user sets the format, the maximum number of columns that the Dataset can display is still calculated according to the original data. However, the maximum number of displayed columns may change after setting the format.
Now the format of each column will be applied before calculating the maximum width of the column. The maximum number of columns that can be displayed will be changed correctly.
* Add mapformats keyword argument to getmaxwidths() and _show()
The FOR loop is duplicated so that mapformats only need to be determined once.
* Update io.jl
Simplify part of the code of getmaxwidths()
* Update io.jl
Make mapformats as a keyword argument and update the docstring of the getmaxwidths() function.1 parent b4a33dc commit ef1e32f
1 file changed
+23
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
15 | | - | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
60 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
133 | 145 | | |
134 | 146 | | |
135 | 147 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
140 | 152 | | |
141 | 153 | | |
142 | 154 | | |
| |||
171 | 183 | | |
172 | 184 | | |
173 | 185 | | |
174 | | - | |
| 186 | + | |
175 | 187 | | |
176 | 188 | | |
177 | 189 | | |
| |||
189 | 201 | | |
190 | 202 | | |
191 | 203 | | |
192 | | - | |
| 204 | + | |
193 | 205 | | |
194 | 206 | | |
195 | 207 | | |
| |||
0 commit comments