Converting excel files to python to frequency
Posted
by
Jacob
on Stack Overflow
See other posts from Stack Overflow
or by Jacob
Published on 2011-11-29T17:13:07Z
Indexed on
2011/11/29
17:50 UTC
Read the original article
Hit count: 339
Essentially I've got an excel files with voltage in the first column, and time in the second. I want to find the period of the voltages, as it returns a graph of voltage in y axis and time in x axis with a periodicity, looking similar to a sine function.
To find the frequency I have uploaded my excel file to python as I think this will make it easier- there may be something I've missed that will simplify this.
So far in python I have:
import xlrd
import numpy as N
import numpy.fft as F
import matplotlib.pyplot as P
wb = xlrd.open_workbook('temp7.xls') #LOADING EXCEL FILE
wb.sheet_names()
sh = wb.sheet_by_index(0)
first_column = sh.col_values(1) #VALUES FROM EXCEL
second_column = sh.col_values(2) #VALUES FROM EXCEL
Now how do I find the frequency from this?
Huge thanks to anyone who can help!
Jacob
© Stack Overflow or respective owner