fix infer_freq raises section (#32642)
fix infer_freq raises section (#32642)

* fix infer_freq raises section

* edits

* another period
dsm054/pandas,TomAugspurger/pandas,TomAugspurger/pandas,gfyoung/pandas,jreback/pandas,datapythonista/pandas,jorisvandenbossche/pandas,datapythonista/pandas,dsm054/pandas,jreback/pandas,TomAugspurger/pandas,rs2/pandas,TomAugspurger/pandas,gfyoung/pandas,dsm054/pandas,dsm054/pandas,pandas-dev/pandas,jorisvandenbossche/pandas,jorisvandenbossche/pandas,rs2/pandas,rs2/pandas,gfyoung/pandas,dsm054/pandas,jreback/pandas,datapythonista/pandas,jreback/pandas,rs2/pandas,gfyoung/pandas,pandas-dev/pandas,jreback/pandas,datapythonista/pandas,pandas-dev/pandas,jorisvandenbossche/pandas,pandas-dev/pandas,gfyoung/pandas