REF: use _get_axis_number instead of if axis in [...]
- [x] Added _get_axis_number in style.py  as per the standards
Hello @goyaldhara! 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/74f85604bc2d5fdcbd9ed0d85a28414fcde8a6b9/pandas/io/formats/style.py):

> [Line 1168:89](https://github.com/pandas-dev/pandas/blob/74f85604bc2d5fdcbd9ed0d85a28414fcde8a6b9/pandas/io/formats/style.py#L1168): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (127 > 88 characters)
> [Line 1168:113](https://github.com/pandas-dev/pandas/blob/74f85604bc2d5fdcbd9ed0d85a28414fcde8a6b9/pandas/io/formats/style.py#L1168): [E261](https://duckduckgo.com/?q=pep8%20E261) at least two spaces before inline comment

 looks like an exact copy of https://github.com/pandas-dev/pandas/pull/43121 with a trivial edit to make it look like it's your own