DOC: Fixing flake8 error in basics.rst
- [x] closes #24173 and follow up on it
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Hi @iamshreeram - can you merge master and address comment? Sure @WillAyd . I will work on it. can you merge master Closing as stale