-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruck data emulation.py
35 lines (29 loc) · 1.21 KB
/
truck data emulation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
if __name__ == '__main__':
import warnings
import matplotlib.pyplot as plt
import plotly.express as px
import numpy as np
import pandas as pd
import plotly.io as pio
import plotly.graph_objs as go
import arviz as az
from scipy import stats
import math
pio.renderers.default='browser'
df = pd.read_csv("C:\\Users\\NIU004\\OneDrive - CSIRO\\Desktop\\Mineral sorting\\Escondida Trucks\\truck data emulation1.csv", skipinitialspace=True)
truck = []
for i in range(12107):
truck.append(df[0+20*i:20+20*i])
percent5 = []
for i in range(len(truck)):
percent5.append(truck[i][0:1])
percent5 = []
[percent5.append(truck[i][0:1].values[0][0]) for i in range(len(truck))]
percent10 = []
[percent10.append(truck[i][0:2].mean().values[0]) for i in range(len(truck))]
percent20 = []
[percent20.append(truck[i][0:4].mean().values[0]) for i in range(len(truck))]
percent50 = []
[percent50.append(truck[i][0:10].mean().values[0]) for i in range(len(truck))]
percent100 = []
[percent100.append(truck[i][0:20].mean().values[0]) for i in range(len(truck))]