tensortrade.feed.api.string.operations module

operations.py contain functions for streaming string operations.

tensortrade.feed.api.string.operations.capitalize(s: Stream[str]) Stream[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: Stream[str], word: str) Stream[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: Stream[str], word: str) Stream[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: Stream[str]) Stream[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: Stream[str], start: int, end: int) Stream[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: Stream[str], word: str) Stream[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: Stream[str]) Stream[str][source]

Computes the uppercase of a string stream.

Parameters:

s (Stream[str]) – A string stream.

Returns:

Stream[str] – A uppercase string stream.