You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas (1.0.3).
Code Sample
# Input date range:pi5m=pd.date_range(start='2019-12-22 06:40:00+00:00', end='2019-12-22 08:45:00+00:00', freq='5min')
# Converting to PeriodIndexpi5m.to_period()
File"/home/p/.local/lib/python3.7/site-packages/pandas/core/arrays/period.py", line938, indt64arr_to_periodarrfreq=Period._maybe_convert_freq(freq)
File"pandas/_libs/tslibs/period.pyx", line1580, inpandas._libs.tslibs.period._Period._maybe_convert_freqAttributeError: 'NoneType'objecthasnoattribute'n'# Workingpi5m.to_period('5min')
Problem description
It is specified in documentation that if not provided, freq is inferred.
However, with above-provided input, I get the error message indicated.
Is this a bug?
Thanks for your feedback.
Bests,
The text was updated successfully, but these errors were encountered:
Code Sample
Problem description
It is specified in documentation that if not provided,
freq
is inferred.However, with above-provided input, I get the error message indicated.
Is this a bug?
Thanks for your feedback.
Bests,
The text was updated successfully, but these errors were encountered: