I am doing a time series analysis:
interval_data_file.csv is a csv file, with two columns: Time and Freq.
import pandas as pd
import datetime
import numpy as np
import matplotlib.pylab as plt
from matplotlib.pylab import rcParams
rcParams['figure.figsize'] = 300, 20
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
INPUT_FILE = 'interval_data_file.csv'
dateparse = lambda dates: pd.datetime.strptime(dates, DATETIME_FORMAT)
data = pd.read_csv(INPUT_FILE, parse_dates=True, index_col='Time',
date_parser=dateparse)
print data.index
ts = data['Freq']
#print ts.head(10)
print ts['1970-02-04 20:12:16']
plt.plot(ts)
plt.show()
This is the plot outputted which is obviously wrong:
Can someone suggest what I am doing wrong?


barplot a try which seems ideal for such a purpose and see if you get the right results? You need to do -plt.bar(ts.index, ts)if you intend on doing viamatplotlib.