BUG: DatetimeIndex with freq raises ValueError when passed value is short by sinhrks · Pull Request #7098 · pandas-dev/pandas (original) (raw)
When DatetimeIndex is created by passing freq and check_integrity=True, passed freq and inferred_freq must be identical. But this comparison can fail if length of passed data doesn't have enough length to infer freq.
Added additional logic to determine whether passed values are on the passed freq.