convert_to_float#
API documentation for tradingstrategy.direct_feed.conversion.convert_to_float Python function.
- convert_to_float(df, conversion)[source]#
Convert raw transaction values ot USD before resample.
This will create a copy of the dataframe.
The resulting DataFrame is going to lose columns that are not on its retained list
Columns are going to be converted to floats
- Parameters:
df (DataFrame) – Raw trades dataframe
conversion (CurrencyConversion) – Do we want the resulting dataframe to be converted using the given exchange rate
- Returns:
Dataframe with floating point USD pricing.
The resulting dataframe is still indexed by block.
- Return type:
DataFrame