question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`read_csv_glob` fails with empty parse_date list

See original GitHub issue

System information

Ray 1.9.2 Modin 0.12.0 Python 3.9.7

Describe the problem

pd_experimental.read_csv_glob("somevalidpath", parse_dates=[])
----
...
File "##/python3.9/site-packages/modin/experimental/pandas/io.py", line 208, in _read
pd_obj = FactoryDispatcher.read_csv_glob(**kwargs)
File "##/python3.9/site-packages/modin/core/execution/dispatching/factories/dispatcher.py", line 185, in read_csv_glob
return cls.__factory._read_csv_glob(**kwargs)
File "##/python3.9/site-packages/modin/core/execution/dispatching/factories/factories.py", line 513, in _read_csv_glob
return cls.io_cls.read_csv_glob(**kwargs)
File "##/python3.9/site-packages/modin/core/io/text/csv_glob_dispatcher.py", line 238, in _read
if isinstance(parse_dates, list) and isinstance(parse_dates[0], list):
IndexError: list index out of range (worker#1713)
File "##/python3.9/site-packages/ray/worker.py", line 1713, in get
raise value.as_instanceof_cause()

it looks like code only checks that the type of parse_dates is a list, but doesn’t check for empty content, tries to access first element and throws an error

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
devin-petersohncommented, Apr 21, 2022

HI @c3-cjazra , for the future we published very detailed release notes. Here are the release notes for 0.14.0: https://github.com/modin-project/modin/releases/tag/0.14.0

Please let us know if there’s any more detail you would want to see!

1reaction
mvashishthacommented, Jan 26, 2022

@c3-cjazra Thank you! I have verified the bug on my computer. I’m working on a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

glob.glob returns an empty list while reading multiple csv files
I am trying to concatenate multiple csv files( all placed in one folder) in a pandas dataframe. When I use glob, I get...
Read more >
pandas.read_csv — pandas 1.5.2 documentation
Read a comma-separated values (csv) file into DataFrame. ... version 1.4.0: Use a list comprehension on the DataFrame's columns after calling read_csv ....
Read more >
Glob Module in Python: Explained - Built In
Glob is a Python function that's used to search for files that match a specific pattern. Here's how to use it.
Read more >
How to Use Glob and Pandas to Read Multiple Filenames
Sometimes we need to work with multiple files. Glob is a handy Python package to read in multiple file names without having to...
Read more >
How to read lots of csv files easily into pandas - pandasninja
1. Use Python generators. As a starting point, you can use pandas.read_csv() “manually” with a handful of files, but it ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found