find_follow_volume_sum_same_price
描述
计算每一行在其后0.1秒内具有相同price和volume的行的volume总和。
函数签名
find_follow_volume_sum_same_price(times, prices, volumes, time_window) -> None
参数
times
(array_like)
时间戳数组(单位:秒)
prices
(array_like)
价格数组
volumes
(array_like)
成交量数组
返回值
numpy.ndarray 每一行在其后0.1秒内具有相同price和volume的行的volume总和
Python调用示例: ```python import pandas as pd import numpy as np from rust_pyfunc import find_follow_volume_sum
创建示例DataFrame
df = pd.DataFrame({ 'exchtime': [1.0, 1.05, 1.08, 1.15, 1.2], 'price': [10.0, 10.0, 10.0, 11.0, 10.0], 'volume': [100, 100, 100, 200, 100] })
计算follow列
df['follow'] = find_follow_volume_sum( df['exchtime'].values, df['price'].values, df['volume'].values ) ```
示例
暂无示例
Python使用示例
import numpy as np
from rust_pyfunc import find_follow_volume_sum_same_price
# 使用示例
# 请参考文档中的参数说明使用此函数