Skip to content
Snippets Groups Projects
Commit 8ca23e98 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

some header fixing

parent b367bf71
No related branches found
No related tags found
No related merge requests found
...@@ -87,31 +87,32 @@ like `s1.loc[:] = s2` do. See also the [cookbook](/docs/cookbook.md#broadcast-ar ...@@ -87,31 +87,32 @@ like `s1.loc[:] = s2` do. See also the [cookbook](/docs/cookbook.md#broadcast-ar
*Indexer Table* *Indexer Table*
| example | type | on | handling | | example | type | on | like `.loc` | handling |
| ------ | ------ | ------ |------ | | ------ | ------ | ------ |------ |
|**column indexer**| |[Column indexer](#select-columns-gracefully)|
| `.aloc[any, ['a']]` | scalar | columns | graceful | | `.aloc[any, ['a']]` | scalar | columns |no| select graceful |
| `.aloc[any, ['a','c']]` | list-like | columns | graceful | | `.aloc[any, 'b':'z']` | slice | columns |yes| slice |
| `.aloc[any [True,False]]` | bool list-like | columns | take `True`'s , length must match (!) | | `.aloc[any, ['a','c']]` | list-like | columns |no| filter graceful |
| `.aloc[any, s]` | pandas.Series | columns | like list, only values | | `.aloc[any [True,False]]` | bool list-like | columns |yes| take `True`'s , length must match (!) |
| `.aloc[any, bs]` | bool pandas.Series | columns | like bool-list | | `.aloc[any, s]` | pandas.Series | columns |no| like list, only values |
| `.aloc[any, 'b':'z']` | slice | columns | filter | | `.aloc[any, bs]` | bool pandas.Series | columns |yes| like bool-list |
|**row indexer**| |[Row indexer](#selecting-rows-a-smart-way)|
| `.aloc[7, any]` | scalar | rows | translate to `.loc[key:key]` | | `.aloc[7, any]` | scalar | rows |no| translate to `.loc[key:key]` |
| `.aloc[[1,2,24], any]` | list-like | rows | handle graceful | | `.aloc[3:42, any]` | slice | rows |yes| slice |
| `.aloc[[True,False], any]` | bool list-like | rows | take `True`'s, length must match nr of (all selected) columns (!) | | `.aloc[[1,2,24], any]` | list-like | rows |no| filter graceful |
| `.aloc[s, any]` | pandas.Series | rows | like `.loc[s.index]` | | `.aloc[[True,False], any]` | bool list-like | rows |yes| take `True`'s, length must match nr of (all selected) columns (!) |
| `.aloc[bs, any]` | bool pandas.Series | rows | align + just take `True`'s, [1] | | `.aloc[s, any]` | pandas.Series | rows |no| like `.loc[s.index]` |
|**2D indexer**| | `.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 columns(!) | | `.aloc[[[s],[1,2,3]], any]` | nested list-like | both |?| one row-indexer per column, outer length must match nr of (selected) columns(!) |
| `.aloc[di]` | dios-like | both | full align | |[2D-indexer](#the-power-of-2d-indexer)|
| `.aloc[di, ...]` | dios-like | both | full align, ellipsis has no effect | | `.aloc[di]` | dios-like | both |no| full align |
| `.aloc[di>5]` | bool dios-like | both | full align + take `True`'s [1] | | `.aloc[di, ...]` | dios-like | both |no| full align, ellipsis has no effect |
| `.aloc[di>5, ...]` | (bool) dios-like | both | full align, disable bool evaluation | | `.aloc[di>5]` | bool dios-like | both |no| full align + take `True`'s [1] |
[1] evaluate `usebool`-keyword | `.aloc[di>5, ...]` | (bool) dios-like | both |no| full align, disable bool evaluation |
[1] evaluate `usebool`-keyword
Example dios Example dios
--------- ============
The dios used in the examples, unless stated otherwise: The dios used in the examples, unless stated otherwise:
...@@ -127,7 +128,7 @@ 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 Select columns, gracefully
--------------------------- ===========================
**single columns** **single columns**
...@@ -185,7 +186,7 @@ d.aloc[:, s] ...@@ -185,7 +186,7 @@ d.aloc[:, s]
``` ```
Selecting Rows a smart way Selecting Rows a smart way
-------------------------- ==========================
For scalar and array-like indexer with label values, the keys are handled gracefully, just like with For scalar and array-like indexer with label values, the keys are handled gracefully, just like with
array-like column indexers. 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 ...@@ -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). [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 The power of 2D-indexer
----------------------- =======================
Overview: 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[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] | | `.aloc[dios, ...]` (use Ellipsis) | 1. align columns, 2. align rows, (3.) ignore values -- [1] |
[1] evaluate `usebool`-keyword [1] evaluate `usebool`-keyword
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment