tensortrade.feed.api.string.operations module

operations.py contain functions for streaming string operations.

tensortrade.feed.api.string.operations.capitalize(s: tensortrade.feed.core.base.Stream[str][str]) → tensortrade.feed.core.base.Stream[str][str][source]

Computes the capitalization of a stream.

Parameters:s (Stream[str]) – A string stream.
Returns:Stream[str] – A capitalized string stream.
tensortrade.feed.api.string.operations.cat(s: tensortrade.feed.core.base.Stream[str][str], word: str) → tensortrade.feed.core.base.Stream[str][str][source]

Computes the concatenation of a stream with a word.

Parameters:
  • s (Stream[str]) – A string stream.
  • word (str) – A word to concatenate with the s.
Returns:

Stream[str] – A concatenated string stream.

tensortrade.feed.api.string.operations.endswith(s: tensortrade.feed.core.base.Stream[str][str], word: str) → tensortrade.feed.core.base.Stream[bool][bool][source]

Computes the boolean stream of a string ending with a specific value.

Parameters:
  • s (Stream[str]) – A string stream.
  • word (str) – A word that a string value can end with.
Returns:

Stream[bool] – A boolean stream.

tensortrade.feed.api.string.operations.lower(s: tensortrade.feed.core.base.Stream[str][str]) → tensortrade.feed.core.base.Stream[str][str][source]

Computes the lowercase of a string stream.

Parameters:s (Stream[str]) – A string stream.
Returns:Stream[str] – A lowercase string stream.
tensortrade.feed.api.string.operations.slice(s: tensortrade.feed.core.base.Stream[str][str], start: int, end: int) → tensortrade.feed.core.base.Stream[str][str][source]

Computes the substring of a string stream.

Parameters:
  • s (Stream[str]) – A string stream.
  • start (int) – The start of the slice.
  • end (int) – The end of the slice.
Returns:

Stream[str] – A substring stream.

tensortrade.feed.api.string.operations.startswith(s: tensortrade.feed.core.base.Stream[str][str], word: str) → tensortrade.feed.core.base.Stream[bool][bool][source]

Computes the boolean stream of a string starting with a specific value.

Parameters:
  • s (Stream[str]) – A string stream.
  • word (str) – A word that a string value can start with.
Returns:

Stream[bool] – A boolean stream.

tensortrade.feed.api.string.operations.upper(s: tensortrade.feed.core.base.Stream[str][str]) → tensortrade.feed.core.base.Stream[str][str][source]

Computes the uppercase of a string stream.

Parameters:s (Stream[str]) – A string stream.
Returns:Stream[str] – A uppercase string stream.