Skip to content

Commit

Permalink
Always read the column names
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyPavlenko committed Sep 23, 2023
1 parent c47b551 commit e79e325
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modin/core/io/text/text_file_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,12 +1060,12 @@ def _read(cls, filepath_or_buffer, **kwargs):
and pre_reading == 0
)
read_callback_kw = dict(kwargs, nrows=1, skipfooter=0, index_col=index_col)
pd_df_metadata = cls.read_callback(

Check warning on line 1063 in modin/core/io/text/text_file_dispatcher.py

View check run for this annotation

Codecov / codecov/patch

modin/core/io/text/text_file_dispatcher.py#L1063

Added line #L1063 was not covered by tests
filepath_or_buffer_md,
**read_callback_kw,
)
column_names = pd_df_metadata.columns

Check warning on line 1067 in modin/core/io/text/text_file_dispatcher.py

View check run for this annotation

Codecov / codecov/patch

modin/core/io/text/text_file_dispatcher.py#L1067

Added line #L1067 was not covered by tests
if not can_compute_metadata_while_skipping_rows:
pd_df_metadata = cls.read_callback(
filepath_or_buffer_md,
**read_callback_kw,
)
column_names = pd_df_metadata.columns
read_callback_kw = None
else:
read_callback_kw = dict(read_callback_kw, skiprows=None)
Expand Down

0 comments on commit e79e325

Please sign in to comment.