print('')
print('timestamps.audit(df.ts, df.data,talk_to_me=True):')
timestamps.audit(df.ts, df.data,talk_to_me=True)

print('')
print('timestamps.describe(df.ts, df.data):')
timestamps.describe(df.ts, df.data)

print('')
print('timestamps.trim(df.ts, df.data):')
df=timestamps.trim(df.ts,df.data)
print(df)

print('')
print('timestamps.fill_data(df.ts, df.data,max_hole_duration=2):')
df = timestamps.fill_data(df.ts, df.data, max_hole_duration=2)
print(df)

fig, ax = plt.subplots(figsize=(10,5))
ax.plot(df.ts,df.data,'r--o',lw=2,label='Filled')
ax.plot(df_initial.ts,df_initial.data,'-o',lw=2,label='Initial')
ax.set_ylim([-1.5,1.5])
ax.set_xlabel('ts',fontsize=20)
ax.set_ylabel('data',fontsize=20)
ax.legend()
for t in ax.get_xticklabels():
    t.set_fontsize(16)
for t in ax.get_yticklabels():
    t.set_fontsize(16)
fig.autofmt_xdate()
#fig.savefig('images/plot_fake_timeseries_aftershave.svg',bbox_inches='tight', pad_inches=0.5)
Beispiel #2
0
print('')
print('timestamps.audit(df,talk_to_me=True):')
timestamps.audit(df,talk_to_me=True)

print('')
print('timestamps.describe(df):')
timestamps.describe(df)

print('')
print('timestamps.trim(df):')
df=timestamps.trim(df)
print(df)

print('')
print('timestamps.fill_data(df,max_hole_duration=2):')
df = timestamps.fill_data(df, max_hole_duration=2)
print(df)

#fig, ax = plt.subplots(figsize=(10,5))
#ax.plot(df.ts,df.data,'r--o',lw=2,label='Filled')
#ax.plot(df_initial.ts,df_initial.data,'-o',lw=2,label='Initial')
#ax.set_ylim([-1.5,1.5])
#ax.set_xlabel('ts',fontsize=20)
#ax.set_ylabel('data',fontsize=20)
#ax.legend()
#for t in ax.get_xticklabels():
#    t.set_fontsize(16)
#for t in ax.get_yticklabels():
#    t.set_fontsize(16)
#fig.autofmt_xdate()
##fig.savefig('images/plot_fake_timeseries_aftershave.svg',bbox_inches='tight', pad_inches=0.5)