# Python Documentation

**URL:** https://forum.tiledb.com/t/python-documentation/301
**Category:** Uncategorized
**Created:** [February 10, 2021, 1:37pm UTC](https://forum.tiledb.com/t/python-documentation/301 "2021-02-10T13:37:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nickholway](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/nickholway/32/68_2.png) [@nickholway](https://forum.tiledb.com/u/nickholway)
#### Post date: [February 10, 2021, 1:37pm UTC](https://forum.tiledb.com/t/python-documentation/301/1 "2021-02-10T13:37:44Z")

</div>

Hi,

I’d like to try out the new features in TileDB in Python. It appears that the Python docs haven’t been updated to reflect nullable attributes etc. Do you know when these will become available?

Thanks

Nick

---

<div class="post-metadata">

### Author: ![ihnorton](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ihnorton/32/23_2.png) [@ihnorton](https://forum.tiledb.com/u/ihnorton)
#### Post date: [February 25, 2021, 4:14am UTC](https://forum.tiledb.com/t/python-documentation/301/2 "2021-02-25T04:14:31Z")

</div>

Hi @nickholway,

The [0.8.4](https://github.com/TileDB-Inc/TileDB-Py/releases/tag/0.8.4) release has support for automatically creating [nullable attributes](https://tiledb-inc-tiledb.readthedocs-hosted.com/projects/tiledb-py/en/stable/python-api.html#tiledb.Attr) from Pandas dataframes with columns using nullable types ([integers](https://pandas.pydata.org/pandas-docs/stable/user_guide/integer_na.html) and [boolean](https://pandas.pydata.org/pandas-docs/stable/user_guide/boolean.html)). Here is an example:

```auto
import tiledb, pandas as pd

# create a nullable integer array
a = pd.array([1, 2, None, 4, 5, None, None], dtype=pd.Int64Dtype())

# create a nullable boolean
b = pd.array([True, False, None, True, True, None, None], dtype='boolean')

# create dataframe from this data
df = pd.DataFrame({"int_column": a, "bool_column": b})

print("input dataframe: \n", df)

uri = "/tmp/df1.tiledb"

# store dataframe using TileDB
tiledb.from_pandas(uri, df)

# read dataframe back, and print the associated schema
with tiledb.open(uri) as A:
    print("result dataframe: ")
    print(A.df[:]) # read result directly as a dataframe

    print("\nAutomatic array schema: \n")
    print(A.schema)

```

> **Output from example script:**
>
> ```auto
> input dataframe: 
> int_column bool_column
> 0 1 True
> 1 2 False
> 2 <NA> <NA>
> 3 4 True
> 4 5 True
> 5 <NA> <NA>
> 6 <NA> <NA>
> result dataframe: 
> int_column bool_column
> 0 1 True
> 1 2 False
> 2 <NA> <NA>
> 3 4 True
> 4 5 True
> 5 <NA> <NA>
> 6 <NA> <NA>
> 
> Automatic array schema: 
> 
> ArraySchema(
> domain=Domain(*[
> Dim(name='__tiledb_rows', domain=(0, 6), tile=6, dtype='uint64'),
> ]),
> attrs=[
> Attr(name='int_column', dtype='int64', var=False, nullable=True, filters=FilterList([ZstdFilter(level=1),])),
> Attr(name='bool_column', dtype='uint8', var=False, nullable=True, filters=FilterList([ZstdFilter(level=1),])),
> ],
> cell_order='row-major',
> tile_order='row-major',
> capacity=10000,
> sparse=False,
> coords_filters=FilterList([ZstdFilter(level=-1),])
> )
> 
> ```

Right now we don’t support NumPy’s [masked arrays](https://numpy.org/doc/stable/reference/maskedarray.html) because they don’t seem to be widely-used (Pandas implementation does not use them), but please let me know if those are of interest; or if there are other libraries with nullable data support that you have in mind.

Best,  
Isaiah
