Convtools

Latest version: v1.14.4

Safety actively analyzes 723296 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 19

0.21.0

**Features**

- backward-compatible change: now ``c.this`` is preferred over ``c.this()``
- ``c.and_`` and ``c.or_`` support any number of arguments (used to be 2
mandatory ones). And also supports ``default: bool = None`` argument to
control what should happen if no arguments are passed:

* if None, raises ``ValueError``
* if false value, returns ``False``
* if true value, returns ``True``

0.20.2

[14](https://github.com/westandskif/convtools/issues/14)

**Misc**

- improved performance of ``Table.chain``, ``Table.into_iter_rows`` and
``Table.into_csv`` methods
- improved performance of ``c.apply_func``

0.20.1

[11](https://github.com/westandskif/convtools/pull/11)

**Features**

- added ``c.chunk_by(c.item("x"), size=100)`` for slicing iterables into chunks
by element values and/or size of chunk
- added ``c.chunk_by_condition(c.CHUNK.item(-1) - c.this() < 100)`` for slicing
iterables into chunks based on condition, which is a function of a current
chunk and a current element
- added ``(...).len()`` shortcut for ``c.call_func(len, c.this())``

**Misc**

- no longer create empty ``labels_`` dict on each converter call where no
labels are going to be used
- no longer create new ``This`` instances, now reusing an existing one

0.19.0

**Features**

[8](https://github.com/westandskif/convtools/issues/8)

- added ``c.ReduceFuncs.Percentile``
- ``c.reduce`` now accepts conversions as ``initial`` argument, this will be
resolved on the first row met. If ``initial`` conversion depends on input
data, it won't be used as ``default`` if default is not provided.
- sped up ``c.ReduceFuncs.Sum`` and ``c.ReduceFuncs.Average`` for cases where
elements are obviously not None

**BREAKING CHANGES:**

Normally you use ``c.ReduceFuncs.Sum(c.this())`` to reduce something, but it's
possible to use custom reduce functions like this:

* ``c.reduce(lambda x, y: x + y, c.this(), initial=0)``
* ``c.reduce(c.inline_expr("{} + {}"), c.this(), initial=0)``

``c.reduce`` used to support ``prepare_first`` parameter which was adding
confusion. Now it's dropped.

0.18.0

**Features**

[6](https://github.com/westandskif/convtools/issues/6)

- added ``c.take_while`` and ``(...).take_while`` re-implementation of
``itertools.takewhile``
- added ``c.drop_while`` and ``(...).drop_while`` re-implementation of
``itertools.dropwhile``

0.17.0

**Features**

- added ``Table.zip`` method to stitch tables (joining on row indexes)
- added ``Table.chain`` method to put tables together one after another

Page 11 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.