Skip to content

Commit 56def6f

Browse files
committed
CLN: remove unreachable
1 parent 15b1f7c commit 56def6f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pandas/plotting/_matplotlib/timeseries.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
)
1111
import warnings
1212

13-
import numpy as np
14-
1513
from pandas._libs.tslibs import (
1614
BaseOffset,
1715
Period,
@@ -265,13 +263,7 @@ def _get_index_freq(index: Index) -> BaseOffset | None:
265263
freq = getattr(index, "freq", None)
266264
if freq is None:
267265
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)
266+
freq = to_offset(freq)
275267
return freq
276268

277269

0 commit comments

Comments
 (0)