REF: use _get_axis_number instead of if axis in [...]: #43048
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

Hello @ppulkit5! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/io/formats/style.py`](https://github.com/pandas-dev/pandas/blob/74d6019b4a676dcb143b39db573270ccec343632/pandas/io/formats/style.py):

> [Line 1153:27](https://github.com/pandas-dev/pandas/blob/74d6019b4a676dcb143b39db573270ccec343632/pandas/io/formats/style.py#L1153): [E271](https://duckduckgo.com/?q=pep8%20E271) multiple spaces after keyword

 this is being addressed in #43121 