Skip to content

Instantly share code, notes, and snippets.

@codeboy5
Created June 20, 2019 04:28
Show Gist options
  • Save codeboy5/3ae373cfa9aed0d15aa62a939198e6f1 to your computer and use it in GitHub Desktop.
Save codeboy5/3ae373cfa9aed0d15aa62a939198e6f1 to your computer and use it in GitHub Desktop.
Get The Mean Values
import numpy as np
import pandas as pd
df = pd.read_excel("data/53Mag.xlsx")
x = df["x"].values
y = df["y"].values
z = df["z"].values
magnitude = df["magnitude"].values
x = x[10:]
y = y[10:]
z = z[10:]
magnitude = magnitude[10:]
meanX = x.mean()
meanY = y.mean()
meanZ = z.mean()
meanMagnitude = magnitude.mean()
print(meanX,meanY,meanZ,meanMagnitude)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment