From b32e97f0e8b832b4a8cd1348b7646a1adaea2797 Mon Sep 17 00:00:00 2001 From: Michelle Sweering <30811910+michellesweering@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:35:32 +0200 Subject: [PATCH] fix: list numbering in roadmap.md --- web/pandas/about/roadmap.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/web/pandas/about/roadmap.md b/web/pandas/about/roadmap.md index 278143c01e7dc..d4a451c2b3a13 100644 --- a/web/pandas/about/roadmap.md +++ b/web/pandas/about/roadmap.md @@ -87,8 +87,8 @@ should result on cleaner, simpler, and more performant code. 1. Label indexing must never involve looking in an axis twice for the same label(s). This implies that any validation step must either: - * limit validation to general features (e.g. dtype/structure of the key/index), or - * reuse the result for the actual indexing. + * limit validation to general features (e.g. dtype/structure of the key/index), or + * reuse the result for the actual indexing. 2. Indexers must never rely on an explicit call to other indexers. For instance, it is OK to have some internal method of `.loc` call some @@ -102,18 +102,18 @@ to `.iloc` should never involve the axes of the object in any way. 4. Indexing must never involve accessing/modifying values (i.e., act on `._data` or `.values`) more than once. The following steps must hence be clearly decoupled: - * find positions we need to access/modify on each axis - * (if we are accessing) derive the type of object we need to return (dimensionality) - * actually access/modify the values - * (if we are accessing) construct the return object + * find positions we need to access/modify on each axis + * (if we are accessing) derive the type of object we need to return (dimensionality) + * actually access/modify the values + * (if we are accessing) construct the return object 5. As a corollary to the decoupling between 4.i and 4.iii, any code which deals on how data is stored (including any combination of handling multiple dtypes, and sparse storage, categoricals, third-party types) must be independent from code that deals with identifying affected rows/columns, and take place only once step 4.i is completed. - * In particular, such code should most probably not live in `pandas/core/indexing.py` - * ... and must not depend in any way on the type(s) of axes (e.g. no `MultiIndex` special cases) + * In particular, such code should most probably not live in `pandas/core/indexing.py` + * ... and must not depend in any way on the type(s) of axes (e.g. no `MultiIndex` special cases) 6. As a corollary to point 1.i, `Index` (sub)classes must provide separate methods for any desired validity check of label(s) which does not involve actual lookup, on the one side, and for any required conversion/adaptation/lookup of label(s), on the other. @@ -121,12 +121,11 @@ on the one side, and for any required conversion/adaptation/lookup of label(s), 7. Use of trial and error should be limited, and anyway restricted to catch only exceptions which are actually expected (typically `KeyError`). - * In particular, code should never (intentionally) raise new exceptions in the `except` portion of a `try... exception` + * In particular, code should never (intentionally) raise new exceptions in the `except` portion of a `try... exception` 8. Any code portion which is not specific to setters and getters must be shared, and when small differences in behavior are expected (e.g. getting with `.loc` raises for missing labels, setting still doesn't), they can be managed with a specific parameter. - ### Numba-accelerated operations [Numba](https://numba.pydata.org) is a JIT compiler for Python code.