<!--
This file is generated by a tool. Do not edit directly.
For open-source contributions the docs will be updated automatically.
-->

*Last updated: 2023-03-16.*

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_quant_finance.experimental.io.ArrayDictReader" />
<meta itemprop="path" content="Stable" />
<meta itemprop="property" content="__init__"/>
<meta itemprop="property" content="__iter__"/>
<meta itemprop="property" content="next"/>
</div>

# tf_quant_finance.experimental.io.ArrayDictReader

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api" align="left">
</table>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/experimental/io.py">View source</a>



Iterator over the data serialized by `ArrayDictWriter`.

```python
tf_quant_finance.experimental.io.ArrayDictReader(
    path
)
```



<!-- Placeholder for "Used in" -->

The reader counterpart of the `ArrayDictWriter`. It deserializes the binary
`tfrecords` files written by the writer.

Provides an iterable interface.

#### Example
```python
  filename = '...'
  reader = ArrayDictReader(filename)
  # Read one record.
  first_record = next(reader)
  for record in reader:
    print(record)  # Print the rest of the records.
```

## Methods

<h3 id="__iter__"><code>__iter__</code></h3>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/experimental/io.py">View source</a>

```python
__iter__()
```




<h3 id="next"><code>next</code></h3>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/experimental/io.py">View source</a>

```python
next()
```

Returns the next record if there is one or raises `StopIteration`.




