Pandas-indexing

Latest version: v0.6.0

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

Scan your dependencies

Page 3 of 4

0.2.8

------------------------------------------------------------
* Units can be converted with :func:`~units.convert_unit`, like f.ex.
``convert_unit(df, "km / h")`` or with ``convert_unit(df, {"m / s": "km / h"})``
to convert only data with the ``m / s`` unit
* If the openscm-units registry is registered as pint application registry then
emission conversion between gas species are possible under the correct
contexts:

.. code-block:: python

from pandas_indexing import set_openscm_registry_as_default, convert_unit

ur = set_openscm_registry_as_default()
with ur.context("AR6GWP100"):
df = convert_unit(df, "Mt CO2e/yr") or df = df.idx.convert_unit("Mt CO2e/yr")

* To use unit conversion, you should install with ``pip install "pandas-indexing[units]"``
to pull in the optional ``pint`` and ``openscm-units`` dependencies
* For more information about unit handling, refer to
:py:mod:`~pandas_indexing.units` or check the code added in :pull:`17`
* Documentation fixes: MyST notebook rendering from :pull:`20` and new docs for
:func:`~core.extractlevel` in :pull:`21`.
* Bug fixes: :func:`~core.semijoin`, :func:`~core.concat` and :func:`~selectors.ismatch`
are working again as advertised :pull:`21` and :pull:`24`.

0.2.7

------------------------------------------------------------
* Compatibility release to re-include Python 3.8 support and fix CI testing
* :func:`~accessors.IndexIdxAccessor.extract` gains single-level index support
* Minimal doc improvements

0.2.6

------------------------------------------------------------
* :func:`~core.extractlevel` can be used on non-multiindex, like
f.ex. ``extractlevel(df, "{sector}|{gas}")`` :pull:`18`
* :func:`~selectors.isin` accepts callable filters :pull:`16`, f.ex.
``df.loc[isin(year=lambda s: s>2000)]``
* New function :func:`~core.concat` makes concatenation level aware :pull:`14`

0.2.5

------------------------------------------------------------
* :func:`~core.formatlevel` and :func:`~core.extractlevel` (or their equivalents
:meth:`~accessors.DataFrameIdxAccessor.format` and
:meth:`~accessors.DataFrameIdxAccessor.extract`) make it easy to combine or split
index levels using format-string like templates; check examples in the guide
(:ref:`Selecting data`) :pull:`13`
* :py:func:`~core.describelevel` superseeds the as-of-now deprecated
:py:func:`~core.summarylevel` :pull:`11`

0.2.4

------------------------------------------------------------

* Paper-bag release: Fix new accessors :py:func:`~accessors.IndexIdxAccessor.unique` and
:py:func:`~accessors.IndexIdxAccessor.__repr__` and improve tests to catch trivial
errors like these earlier :pull:`10`

0.2.3

------------------------------------------------------------

* :py:func:`~core.uniquelevel` or ``.idx.unique`` returns the unique values of one
or multiple levels. :pull:`8`
* :py:func:`~core.summarylevel` creates a string summarizing the index levels and their
values. Can also be accessed as ``df.idx`` or ``index.idx`` :pull:`9`

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.