pandas: powerful Python data analysis toolkit - 0.7.10.281957 -2.290613 The MultiIndex object has code to explicity check the sort depth. Thus, if you try to index at a depth at which the index is not sorted, it will raise an exception. Here is a concrete MultiIndex.from_tuples(tuples) In [563]: idx.lexsort_depth Out[563]: 2 In [564]: reordered = idx[[1, 0, 3, 2]] In [565]: reordered.lexsort_depth Out[565]: 1 In [566]: s = Series(randn(4), index=reordered) b -1.099248 a 0.255269 However: >>> s.ix[(’a’, ’b’):(’b’, ’a’)] Exception: MultiIndex lexsort depth 1, key was length 2 7.4.9 Swapping levels with swaplevel The swaplevel function can switch the order0 码力 | 281 页 | 1.45 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.7.20.281957 -2.290613 The MultiIndex object has code to explicity check the sort depth. Thus, if you try to index at a depth at which the index is not sorted, it will raise an exception. Here is a concrete MultiIndex.from_tuples(tuples) In [563]: idx.lexsort_depth Out[563]: 2 In [564]: reordered = idx[[1, 0, 3, 2]] In [565]: reordered.lexsort_depth Out[565]: 1 In [566]: s = Series(randn(4), index=reordered) b -1.099248 a 0.255269 However: >>> s.ix[(’a’, ’b’):(’b’, ’a’)] Exception: MultiIndex lexsort depth 1, key was length 2 7.4.9 Swapping levels with swaplevel The swaplevel function can switch the order0 码力 | 283 页 | 1.45 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.7.30.281957 -2.290613 The MultiIndex object has code to explicity check the sort depth. Thus, if you try to index at a depth at which the index is not sorted, it will raise an exception. Here is a concrete MultiIndex.from_tuples(tuples) In [572]: idx.lexsort_depth Out[572]: 2 In [573]: reordered = idx[[1, 0, 3, 2]] In [574]: reordered.lexsort_depth Out[574]: 1 In [575]: s = Series(randn(4), index=reordered) b -1.099248 a 0.255269 However: >>> s.ix[(’a’, ’b’):(’b’, ’a’)] Exception: MultiIndex lexsort depth 1, key was length 2 7.4.9 Swapping levels with swaplevel The swaplevel function can switch the order0 码力 | 297 页 | 1.92 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.20.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1673 34.9.1.21 pandas.MultiIndex.lexsort_depth . . . . . . . . . . . . . . . . . . . . . . . . . . . 1673 34.9.1.22 pandas.MultiIndex.name . . . Performance Improvements • Bug Fixes 1.14.1 API changes • Indexing in MultiIndex beyond lex-sort depth is now supported, though a lexically sorted index will have a better performance. (GH2646) In [1]: Out[2]: jolie jim joe 0 x 0.123943 x 0.119381 1 z 0.738523 y 0.587304 In [3]: df.index.lexsort_depth \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\0 码力 | 2045 页 | 9.18 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.19.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1619 pandas.MultiIndex.lexsort_depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1619 pandas.MultiIndex.name . . Python data analysis toolkit, Release 0.19.0 API changes • Indexing in MultiIndex beyond lex-sort depth is now supported, though a lexically sorted index will have a better performance. (GH2646) In [1]: Out[2]: jolie jim joe 0 x 0.123943 x 0.119381 1 z 0.738523 y 0.587304 In [3]: df.index.lexsort_depth Out[3]: 1 # in prior versions this would raise a KeyError # will now show a PerformanceWarning In0 码力 | 1937 页 | 12.03 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.19.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1624 pandas.MultiIndex.lexsort_depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1624 pandas.MultiIndex.name . . Python data analysis toolkit, Release 0.19.1 API changes • Indexing in MultiIndex beyond lex-sort depth is now supported, though a lexically sorted index will have a better performance. (GH2646) In [1]: Out[2]: jolie jim joe 0 x 0.123943 x 0.119381 1 z 0.738523 y 0.587304 In [3]: df.index.lexsort_depth Out[3]: 1 # in prior versions this would raise a KeyError # will now show a PerformanceWarning In0 码力 | 1943 页 | 12.06 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.21.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1772 34.10.1.21pandas.MultiIndex.lexsort_depth . . . . . . . . . . . . . . . . . . . . . . . . . . . 1772 xxxiii 34.10.1.22pandas.MultiIndex.name Performance Improvements • Bug Fixes 1.16.1 API changes • Indexing in MultiIndex beyond lex-sort depth is now supported, though a lexically sorted index will have a better performance. (GH2646) In [1]: Out[2]: jolie jim joe 0 x 0.123943 x 0.119381 1 z 0.738523 y 0.587304 In [3]: df.index.lexsort_depth \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\0 码力 | 2207 页 | 8.59 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.15Performance Improvements • Bug Fixes 1.1.1 API changes • Indexing in MultiIndex beyond lex-sort depth is now supported, though a lexically sorted index will have a better performance. (GH2646) In [1]: Out[2]: jolie jim joe 0 x 0.179356 x 0.908835 1 z 0.571981 y 0.851401 In [3]: df.index.lexsort_depth Out[3]: 1 # in prior versions this would raise a KeyError # will now show a PerformanceWarning In Out[6]: jolie jim joe 0 x 0.179356 x 0.908835 1 y 0.851401 z 0.571981 In [7]: df2.index.lexsort_depth Out[7]: 2 In [8]: df2.loc[(1,’z’)] Out[8]: jolie jim joe 1 z 0.571981 • Bug in unique of Series0 码力 | 1579 页 | 9.15 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.14.0notebook will use html representation for pandas objects (if it is available). display.pprint_nest_depth : [default: 3] [currently: 3]: int Controls the number of nested levels to process when pretty-printing -0.766820 -0.281965 The MultiIndex object has code to explicity check the sort depth. Thus, if you try to index at a depth at which the index is not sorted, it will raise an exception. Here is a concrete MultiIndex.from_tuples(tuples) In [398]: idx.lexsort_depth Out[398]: 2 In [399]: reordered = idx[[1, 0, 3, 2]] In [400]: reordered.lexsort_depth Out[400]: 1 In [401]: s = Series(randn(4), index=reordered)0 码力 | 1349 页 | 7.67 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.20.2Performance Improvements • Bug Fixes 1.13.1 API changes • Indexing in MultiIndex beyond lex-sort depth is now supported, though a lexically sorted index will have a better performance. (GH2646) In [1]: Out[2]: jolie jim joe 0 x 0.123943 x 0.119381 1 z 0.738523 y 0.587304 In [3]: df.index.lexsort_depth \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Out[6]: jolie jim joe 0 x 0.123943 x 0.119381 1 y 0.587304 z 0.738523 In [7]: df2.index.lexsort_depth \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\0 码力 | 1907 页 | 7.83 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













