BUG : Series.to_timestamp and Series.to_period raise user-facing AssertionError
- [X] closes #33327
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

Thanks @vipulrai91 for the PR. can you add tests that test for the error message. Also a whatsnew in doc/source/whatsnew/v1.1.0rst > Also a whatsnew in doc/source/whatsnew/v1.1.0rst

Yes , I  would add it once the above part is fixed. Hello @vipulrai91! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:







There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2020-05-20 11:42:15 UTC > Should the test be like this

we use `with pytest.raises(..., match=...)` pattern

> pandas/tests/series/test_period.py
 
pandas\tests\series\methods\test_to_period.py and pandas\tests\series\methods\test_to_timestamp.py


> > Also a whatsnew in doc/source/whatsnew/v1.1.0rst
> 
> Yes , I would add it once the above part is fixed.

add in Backwards incompatible API changes section

As this previously raised AttributeError, https://github.com/pandas-dev/pandas/issues/33327#issuecomment-625849949, can add similar to existing release note for swaplevels

```
- :meth:`DataFrame.swaplevels` now raises a  ``TypeError`` if the axis is not a :class:`MultiIndex`.
  Previously an ``AttributeError`` was raised (:issue:`31126`)
``` > Thanks @vipulrai91 for the PR. can you add tests that test for the error message.



> can you add a test that hits this

@jreback 
 added tests  at  : pandas/tests/series/methods/test_to_period.py and
       pandas/tests/series/methods/test_to_timestamp.py

Please let me know if this is correct , also , I am not sure which parts to add the doc in doc/source/whatsnew/v1.1.0.rst > I am not sure which parts to add the doc in doc/source/whatsnew/v1.1.0.rst

see https://github.com/pandas-dev/pandas/pull/34067#issuecomment-627342733
 thanks @vipulrai91 very nice