categorical type column and interval data to a CSV file
- [x] closes #46297 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature

- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Hello @Kyrpel! 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:



* In the file [`pandas/tests/io/formats/test_to_csv.py`](https://github.com/pandas-dev/pandas/blob/a0f99f14aeddbf46f584c6859b1435b32bb5653c/pandas/tests/io/formats/test_to_csv.py):

> [Line 321:89](https://github.com/pandas-dev/pandas/blob/a0f99f14aeddbf46f584c6859b1435b32bb5653c/pandas/tests/io/formats/test_to_csv.py#L321): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (91 > 88 characters)
> [Line 322:45](https://github.com/pandas-dev/pandas/blob/a0f99f14aeddbf46f584c6859b1435b32bb5653c/pandas/tests/io/formats/test_to_csv.py#L322): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 324:56](https://github.com/pandas-dev/pandas/blob/a0f99f14aeddbf46f584c6859b1435b32bb5653c/pandas/tests/io/formats/test_to_csv.py#L324): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','



##### Comment last updated at 2022-03-23 13:45:12 UTC