Skip to content

Commit

Permalink
FIX-modin-project#6553: fix 'read_csv' with 'iterator=True'
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed Sep 12, 2023
1 parent 9886c01 commit 3eac045
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modin/core/io/text/text_file_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@ def check_parameters_support(
if read_kwargs["chunksize"] is not None:
return (False, "`chunksize` parameter is not supported")

if read_kwargs.get("iterator"):
return (False, "`iterator==True` parameter is not supported")

if read_kwargs.get("dialect") is not None:
return (False, "`dialect` parameter is not supported")

Expand Down
10 changes: 10 additions & 0 deletions modin/pandas/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,16 @@ def test_read_csv_iteration(self, iterator):

df_equals(modin_df, pd_df)

# Tests #6553
if iterator:
rdf_reader = pd.read_csv(filename, iterator=iterator)
pd_reader = pandas.read_csv(filename, iterator=iterator)

modin_df = rdf_reader.read()
pd_df = pd_reader.read()

df_equals(modin_df, pd_df)

def test_read_csv_encoding_976(self):
file_name = "modin/pandas/test/data/issue_976.csv"
names = [str(i) for i in range(11)]
Expand Down

0 comments on commit 3eac045

Please sign in to comment.