Code style improvements

This commit is contained in:
Matthias
2024-01-24 20:25:25 +01:00
parent 6aa4de4d29
commit 0077f3c9a5
3 changed files with 9 additions and 6 deletions

View File

@@ -118,7 +118,10 @@ def generate_trades_history(n_rows, start_date: Optional[datetime] = None, days=
random_timestamps_in_seconds = np.random.uniform(_start_timestamp, _end_timestamp, n_rows)
timestamp = pd.to_datetime(random_timestamps_in_seconds, unit='s')
id = [f'a{np.random.randint(1e6, 1e7-1)}cd{np.random.randint(100, 999)}' for _ in range(n_rows)]
id = [
f'a{np.random.randint(1e6, 1e7 - 1)}cd{np.random.randint(100, 999)}'
for _ in range(n_rows)
]
side = np.random.choice(['buy', 'sell'], n_rows)