Welcome to xndframes’s documentation!¶
Installation¶
Stable release¶
To install xndframes, run this command in your terminal:
$ pip install xndframes
This is the preferred method to install xndframes, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
From sources¶
The sources for xndframes can be downloaded from the Github repo.
You can either clone the public repository:
$ git clone git://github.com/Quansight/xndframes
Or download the tarball:
$ curl -OL https://github.com/Quansight/xndframes/tarball/master
Once you have a copy of the source, you can install it with:
$ python setup.py install
Usage¶
Xndframes is meant to provide a set of Pandas ExtensionDType/Array implementations backed by xnd
This document describes how to use the methods and classes provided by xndframes
.
We will assume that the following packages have been imported.
In [1]: import xndframes as xf
In [2]: import pandas as pd
Pandas Integration¶
So far, xndframes implements XndframesArray
. XndframesArray
satisfies pandas extension array interface, which means that it can safely be stored inside pandas’s
Series and DataFrame.
In [3]: s = ["Pandas", "NumPy", "xnd", "SciPy", None, "CuPy", None, "Keras", "Numba"]
In [4]: packages = xf.XndframesArray(s)
In [5]: type(packages)
Out[5]: xndframes.base.XndframesArray
In [6]: print(packages.data)