I've got working code below. Currently I'm pulling data from sav files, exporting it to a csv file, and then plotting this data. It looks good, but I'd like to zoom in on it and I'm not entirely sure how to do it. This is because my time is listed in the following format:
20141107B205309Y
There are both letters and numbers within the code, so I'm not sure what to do.
I could do this two ways, I suppose:
I was considering using python to "trim" the time data so it displays with only the "20141107" in the csv file, which should make it easy to browse.
I'm not sure if its possible but if someone knows how I could obviously search the code using "xrange=[]" as I typically would with data.
My code:
import scipy.io as spio
import numpy as np
import csv
import pandas as pd
import matplotlib as plt
np.set_printoptions(threshold=np.nan)
onfile='/file'
finalfile='/fileout'
s=spio.readsav(onfile,python_dict=true,verbose=true)
time=np.asarray(s["time"])
data=np.asarray(s["data"])
d=pd.DataFrame({'time':time,'data':data})
d.to_csv(finalfile,sep=' ', encoding='utf-u',header=True)
d.plot(x='time',y='data',kind='line')