We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15b1f7c commit 56def6fCopy full SHA for 56def6f
pandas/plotting/_matplotlib/timeseries.py
@@ -10,8 +10,6 @@
10
)
11
import warnings
12
13
-import numpy as np
14
-
15
from pandas._libs.tslibs import (
16
BaseOffset,
17
Period,
@@ -265,13 +263,7 @@ def _get_index_freq(index: Index) -> BaseOffset | None:
265
263
freq = getattr(index, "freq", None)
266
264
if freq is None:
267
freq = getattr(index, "inferred_freq", None)
268
- if freq == "B":
269
- # error: "Index" has no attribute "dayofweek"
270
- weekdays = np.unique(index.dayofweek) # type: ignore[attr-defined]
271
- if (5 in weekdays) or (6 in weekdays):
272
- freq = None
273
274
- freq = to_offset(freq)
+ freq = to_offset(freq)
275
return freq
276
277
0 commit comments