turicreate.visualization.item_frequency(sa, xlabel='__TURI_DEFAULT_LABEL', ylabel='__TURI_DEFAULT_LABEL', title='__TURI_DEFAULT_LABEL')

Plots an item frequency of the sarray provided as input, and returns the resulting Plot object.

The function supports SArrays with dtype str.

sa : SArray

The data to get an item frequency for. Must have dtype str

xlabel : str (optional)

The text label for the X axis. Defaults to “Values”.

ylabel : str (optional)

The text label for the Y axis. Defaults to “Count”.

title : str (optional)

The title of the plot. Defaults to LABEL_DEFAULT. If the value is LABEL_DEFAULT, the title will be “<xlabel> vs. <ylabel>”. If the value is None, the title will be omitted. Otherwise, the string passed in as the title will be used as the plot title.

out : Plot

A :class: Plot object that is the item frequency plot.


Make an item frequency of an SArray.

>>> x = turicreate.SArray(['a','ab','acd','ab','a','a','a','ab','cd'])
>>> ifplt = turicreate.visualization.item_frequency(x)