Is there a way to get the time series frequency in pandas?
rng = date_range('1/1/2011', periods=72, freq='H')
ts =pd.Series(np.random.randn(len(rng)), index=rng)
ts.frequency or ts.period are not available.
thanks
Edit:
Can we infer a frequency from time series that do not indicate a frequency?
import pandas.io.data as web
aapl = web.get_data_yahoo("AAPL")
<class 'pandas.tseries.index.DatetimeIndex'>
[2010-01-04 00:00:00, ..., 2013-12-19 00:00:00]
Length: 999, Freq: None, Timezone: None
Can we somehow change the frequency of aapl? As we know, these are business days.
source
share