Skip to content

Usage with Pandas

Severin Ibarluzea edited this page Apr 3, 2020 · 2 revisions

Universal Data Tool files integrate easily with pandas. First, export your project to a *.udt.csv file. Then use something like the code below:

>>> import pandas as pd

>>> df = pd.read_csv("./myfile.udt.csv")

>>> df[df["path"].str.match("samples")]

        path    .                                           document        output.label
1  samples.0  NaN                  Wow this is terrible. I hated it.  negative_sentiment
2  samples.1  NaN            This has made me so happy. I love this.  positive_sentiment
3  samples.2  NaN  At first I wasn't sure. Then I thought, oh it'...  negative_sentiment