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]) → tensortrade.feed.core.base.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: tensortrade.feed.core.base.Stream[str], word: str) → tensortrade.feed.core.base.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: tensortrade.feed.core.base.Stream[str], word: str) → tensortrade.feed.core.base.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: tensortrade.feed.core.base.Stream[str]) → tensortrade.feed.core.base.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: tensortrade.feed.core.base.Stream[str], start: int, end: int) → tensortrade.feed.core.base.Stream[str][source]¶ Computes the substring of a string stream.
- Parameters
s (Stream[str]) – A string stream.
- Returns
Stream[str] – A substring stream.
-
tensortrade.feed.api.string.operations.startswith(s: tensortrade.feed.core.base.Stream[str], word: str) → tensortrade.feed.core.base.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: tensortrade.feed.core.base.Stream[str]) → tensortrade.feed.core.base.Stream[str][source]¶ Computes the uppercase of a string stream.
- Parameters
s (Stream[str]) – A string stream.
- Returns
Stream[str] – A uppercase string stream.