Metadata-Version: 2.4
Name: pandas-uuid
Version: 0.1
Summary: Pandas ExtensionArray / ExtensionDType for UUIDs.
Project-URL: Source, https://github.com/scverse/pandas-uuid
Project-URL: Documentation, https://icb-pandas-uuid.readthedocs.io/
Author-email: "Philipp A." <flying-sheep@web.de>
License-Expression: MPL-2.0
License-File: LICENSE.rst
Requires-Python: >=3.12
Requires-Dist: numpy
Requires-Dist: pandas
Provides-Extra: pyarrow
Requires-Dist: pyarrow; extra == 'pyarrow'
Description-Content-Type: text/x-rst



Pandas ExtensionArray / ExtensionDType for UUID
===============================================

.. usage-start

Use `UuidDtype` as a `pandas` extension dtype:

>>> from uuid import uuid4
>>> import pandas as pd
>>> from pandas_uuid import UuidDtype
>>>
>>> s = pd.Series([uuid4()], dtype=UuidDtype())
>>> s
0    cd072cd8-be6f-4f62-ac4c-09c28206e7e3
dtype: uuid

Use specific storage types by importing `UuidArray` / `ArrowUuidArray`,
or by using the ``storage`` parameter of `UuidDtype`:

>>> cls = UuidDtype("numpy").construct_array_type()
>>> cls
<class 'pandas_uuid.UuidArray'>
>>> cls.random(2, rng=42)
<UuidArray>
[8826d916-cdfb-21c6-c1ff-91a761565a70, 2416da6e-c212-cddb-8d88-00160eb686b2]
Length: 2, dtype: uuid

..  note::
    There is probably no good reason to ever set ``rng``
    to a static seed apart from testing.

.. usage-end

For advanced usage, see the Documentation_.

.. _documentation: https://icb-pandas-uuid.readthedocs-hosted.com/en/latest/#usage
