diff --git a/docs/aloc_usage.md b/docs/aloc_usage.md index 816ec14176cab85c7da75618e1d9de3cf07be6ec..b682253cf2427629e980d2061b364e1ea894ce3e 100644 --- a/docs/aloc_usage.md +++ b/docs/aloc_usage.md @@ -87,31 +87,32 @@ like `s1.loc[:] = s2` do. See also the [cookbook](/docs/cookbook.md#broadcast-ar *Indexer Table* -| example | type | on | handling | +| example | type | on | like `.loc` | handling | | ------ | ------ | ------ |------ | -|**column indexer**| -| `.aloc[any, ['a']]` | scalar | columns | graceful | -| `.aloc[any, ['a','c']]` | list-like | columns | graceful | -| `.aloc[any [True,False]]` | bool list-like | columns | take `True`'s , length must match (!) | -| `.aloc[any, s]` | pandas.Series | columns | like list, only values | -| `.aloc[any, bs]` | bool pandas.Series | columns | like bool-list | -| `.aloc[any, 'b':'z']` | slice | columns | filter | -|**row indexer**| -| `.aloc[7, any]` | scalar | rows | translate to `.loc[key:key]` | -| `.aloc[[1,2,24], any]` | list-like | rows | handle graceful | -| `.aloc[[True,False], any]` | bool list-like | rows | take `True`'s, length must match nr of (all selected) columns (!) | -| `.aloc[s, any]` | pandas.Series | rows | like `.loc[s.index]` | -| `.aloc[bs, any]` | bool pandas.Series | rows | align + just take `True`'s, [1] | -|**2D indexer**| -| `.aloc[[[s],[1,2,3]], any]` | nested list-like | both | one row-indexer per column, outer length must match nr of columns(!) | -| `.aloc[di]` | dios-like | both | full align | -| `.aloc[di, ...]` | dios-like | both | full align, ellipsis has no effect | -| `.aloc[di>5]` | bool dios-like | both | full align + take `True`'s [1] | -| `.aloc[di>5, ...]` | (bool) dios-like | both | full align, disable bool evaluation | -[1] evaluate `usebool`-keyword +|[Column indexer](#select-columns-gracefully)| +| `.aloc[any, ['a']]` | scalar | columns |no| select graceful | +| `.aloc[any, 'b':'z']` | slice | columns |yes| slice | +| `.aloc[any, ['a','c']]` | list-like | columns |no| filter graceful | +| `.aloc[any [True,False]]` | bool list-like | columns |yes| take `True`'s , length must match (!) | +| `.aloc[any, s]` | pandas.Series | columns |no| like list, only values | +| `.aloc[any, bs]` | bool pandas.Series | columns |yes| like bool-list | +|[Row indexer](#selecting-rows-a-smart-way)| +| `.aloc[7, any]` | scalar | rows |no| translate to `.loc[key:key]` | +| `.aloc[3:42, any]` | slice | rows |yes| slice | +| `.aloc[[1,2,24], any]` | list-like | rows |no| filter graceful | +| `.aloc[[True,False], any]` | bool list-like | rows |yes| take `True`'s, length must match nr of (all selected) columns (!) | +| `.aloc[s, any]` | pandas.Series | rows |no| like `.loc[s.index]` | +| `.aloc[bs, any]` | bool pandas.Series | rows |no| align + just take `True`'s, [1] | +| `.aloc[[[s],[1,2,3]], any]` | nested list-like | both |?| one row-indexer per column, outer length must match nr of (selected) columns(!) | +|[2D-indexer](#the-power-of-2d-indexer)| +| `.aloc[di]` | dios-like | both |no| full align | +| `.aloc[di, ...]` | dios-like | both |no| full align, ellipsis has no effect | +| `.aloc[di>5]` | bool dios-like | both |no| full align + take `True`'s [1] | +| `.aloc[di>5, ...]` | (bool) dios-like | both |no| full align, disable bool evaluation | +[1] evaluate `usebool`-keyword Example dios ---------- +============ The dios used in the examples, unless stated otherwise: @@ -127,7 +128,7 @@ The dios used in the examples, unless stated otherwise: ``` Select columns, gracefully ---------------------------- +=========================== **single columns** @@ -185,7 +186,7 @@ d.aloc[:, s] ``` Selecting Rows a smart way --------------------------- +========================== For scalar and array-like indexer with label values, the keys are handled gracefully, just like with array-like column indexers. @@ -327,14 +328,19 @@ as long as the two series objects not have the same index. But maybe one want to [DictOfSeries.index_of()](/docs/methods_and_properties.md#diosdictofseriesindex_of). +**T_O_D_O - nested lists** +- `.aloc[nested list]` - use a own list-like row indexer on each columns +- sublists can be series, bool-series, lists or bool-lists + + + The power of 2D-indexer ------------------------ +======================= Overview: | | | | ------ | ------ | -| `.aloc[nested lists]` | use different indexer-types on different columns | | `.aloc[bool-dios]` | 1. align columns, 2. align rows, 3. just take `True`'s -- [1] | | `.aloc[dios, ...]` (use Ellipsis) | 1. align columns, 2. align rows, (3.) ignore values -- [1] | [1] evaluate `usebool`-keyword