Repository: modin-project/modin

Issue:
BUG: Failed to pass `storage_options` parameter to the `to_csv` function of PandasOnRayIO class with fsspec
### Modin version checks

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the latest released version of Modin.

- [X] I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow [this guide](https://modin.readthedocs.io/en/stable/getting_started/installation.html#installing-from-the-github-master-branch).)


### Reproducible Example

```python
import ray
import modin.pandas as pd

ray.init(address='auto',
         runtime_env={'env_vars': {'__MODIN_AUTOIMPORT_PANDAS__': '1'}})

df = pd.read_csv("/path/to/file.csv")

df.to_csv("protocol_name://path/to/output_file.csv", storage_options={"threshold": 10})
```


### Issue Description

...modin/core/execution/ray/implementations/pandas_on_ray/io/io.py", line 164, in func
    df.to_csv(**csv_kwargs)
.../lib/python3.8/site-packages/pandas/io/common.py", line 432, in _get_filepath_or_buffer
    raise ValueError(
`ValueError: storage_options passed with file object or non-fsspec file path`


### Expected Behavior

`to_csv` function should pass `storage_options` parameter to fsspec.



### Error Logs

<details>

```python-traceback

Replace this line with the error backtrace (if applicable).

```

</details>


### Installed Versions

<details>

INSTALLED VERSIONS
------------------
commit           : 26ce87547e327ad129ca1d75dc9102bf9d5cb77c
python           : 3.8.15.final.0
python-bits      : 64
OS               : Darwin
OS-release       : 22.4.0
Version          : Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
machine          : arm64
processor        : arm
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

Modin dependencies
------------------
modin            : 0+untagged.2394.g26ce875.dirty
ray              : 2.3.1
dask             : 2023.4.0
distributed      : 2023.4.0
hdk              : None

pandas dependencies
-------------------
pandas           : 1.5.3
numpy            : 1.22.3
pytz             : 2022.7
dateutil         : 2.8.2
setuptools       : 66.0.0
pip              : 23.0.1
Cython           : None
pytest           : 7.2.1
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : 2.9.3
jinja2           : 3.1.2
IPython          : 8.12.0
pandas_datareader: None
bs4              : 4.12.2
bottleneck       : 1.3.5
brotli           : 
fastparquet      : None
fsspec           : 2022.11.0
gcsfs            : None
matplotlib       : 3.6.2
numba            : None
numexpr          : 2.8.4
odfpy            : None
openpyxl         : 3.0.9
pandas_gbq       : None
pyarrow          : 8.0.0
pyreadstat       : None
pyxlsb           : None
s3fs             : 2022.11.0
scipy            : 1.10.1
snappy           : None
sqlalchemy       : 1.4.39
tables           : None
tabulate         : 0.9.0
xarray           : None
xlrd             : None
xlwt             : None
zstandard        : None
tzdata           : None
​



</details>



Discussion:

Resolving patch:
diff --git a/modin/core/execution/ray/implementations/pandas_on_ray/io/io.py b/modin/core/execution/ray/implementations/pandas_on_ray/io/io.py
--- a/modin/core/execution/ray/implementations/pandas_on_ray/io/io.py
+++ b/modin/core/execution/ray/implementations/pandas_on_ray/io/io.py
@@ -160,7 +160,9 @@ def func(df, **kw):  # pragma: no cover
             path_or_buf = csv_kwargs["path_or_buf"]
             is_binary = "b" in csv_kwargs["mode"]
             csv_kwargs["path_or_buf"] = io.BytesIO() if is_binary else io.StringIO()
+            storage_options = csv_kwargs.pop("storage_options", None)
             df.to_csv(**csv_kwargs)
+            csv_kwargs.update({"storage_options": storage_options})
             content = csv_kwargs["path_or_buf"].getvalue()
             csv_kwargs["path_or_buf"].close()
 


Test patch: