I have a DataFrame with intraday data indexed using DatetimeIndex
df1 =pd.DataFrame(np.random.randn(6,4),index=pd.date_range('1/1/2000',periods=6, freq='1h'))
df2 =pd.DataFrame(np.random.randn(6,4),index=pd.date_range('1/2/2000',periods=6, freq='1h'))
df3 = df1.append(df2)
as you can see that for two days there is a big gap in df3
df3.plot ()
will be every hour from 2000-01-01 00:00:00to 2000-01-02 05:00:00, but in fact from 2000-01-01 06:00:00to 2000-01-02 00:00:00there is actually no datapoint.
How to leave this data point on the chart so that from 2000-01-01 06:00:00to is 2000-01-02 00:00:00not displayed?
source
share