<jupyter_start><jupyter_text>Basic TFRUtil UsageThis notebook demonstrates the basic usage of TFRUtil.  It is meant to be run from the /sample/ path and uses test images included with TFRUtil stored in /tfrutil/test_data.Before running this notebook, please install TFUtil with the command `python setup.py` from the repository root.<jupyter_code>import os
import pathlib

import pandas as pd
import tfrecorder
input_file = pathlib.Path(os.getcwd())/'../tfrecorder/test_data/data.csv'
output_dir = './out'  # YOUR LOCAL OUTPUT PATH HERE
df = pd.read_csv(input_file)
df.head()
results = df.tensorflow.to_tfr(output_dir)
results
!ls -R $output_dir<jupyter_output>[1m[34m[47mtfrecorder-20201022-121014-to-tfr[m[m [1m[34m[47mtfrecorder-20201022-123151-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-121047-to-tfr[m[m [1m[34m[47mtfrecorder-20201022-132122-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-121052-to-tfr[m[m [1m[34m[47mtfrecorder-20201022-132135-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-122052-to-tfr[m[m [1m[34m[47mtfrecorder-20201022-132406-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-122403-to-tfr[m[m [1m[34m[47mtfrecorder-20201022-132701-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-122505-to-tfr[m[m [1m[34m[47mtfrecorder-20201022-133529-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-122646-to-tfr[m[m [1m[34m[47mtfrecorder-20201022-133624-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-122743-to-tfr[m[m [1m[34m[47mtfrecorder-20201027-173444-to-tfr[m[m
[1m[34m[47mtfrecorder-20201022-123126-to-tfr[m[m [1m[34m[47mtfrecorder-20201028-160301-to-tfr[m[m

./out/tfrecorder-20201022-1[...]
{'fraction_non_alphanumeric': 0.1908763505402161, 'fraction_numerical': 0.21068427370948378, 'mean_word_length': 7.211822660098522, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '516878', 'license': 'Apache-2.0', 'n_tokens_mistral': 1049, 'n_tokens_neox': 763, 'n_words': 90, 'path': 'samples/Basic-TFRecorder-Usage.ipynb', 'repo_name': 'jared-burns/tensorflow-recorder', 'size': '1666'}