BUG: df.plot
works differently for freq="h"
and freq="60min"
· Issue #57587 · pandas-dev/pandas (original) (raw)
This bug has not been reported and exists on the latest version of pandas.
Reproducible Examples:
if freq="h"
from pandas import *
import numpy as np
frqncy = 'h'
idx = period_range("01/01/2000", freq=frqncy, periods=4)
df = DataFrame(
np.array([0, 1, 0, 1]),
index=idx,
columns=["A"],
)
res = df.plot()
print(res.freq)
print(df)
But if freq="60min"
frqncy = '60min'
idx = period_range("01/01/2000", freq=frqncy, periods=4)
df = DataFrame(
np.array([0, 1, 0, 1]),
index=idx,
columns=["A"],
)
res = df.plot()
print(res.freq)
print(df)
the result of plotting is different
Expected Behavior:
I think for both freq="h"
and freq="60min"
plotting should give the same result. The correct behavior should be that what is shown for freq="h"
.