Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing empty modin.Series leads to raising exception #1647

Closed
dchigarev opened this issue Jun 22, 2020 · 2 comments · Fixed by #1859
Closed

Printing empty modin.Series leads to raising exception #1647

dchigarev opened this issue Jun 22, 2020 · 2 comments · Fixed by #1859
Labels
bug 🦗 Something isn't working
Milestone

Comments

@dchigarev
Copy link
Collaborator

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 1809
  • Modin version (modin.__version__): 0.7.3+148.ga2d7189
  • Python version: 3.7.5
  • Code we can use to reproduce:
if __name__ == "__main__":
    import modin.pandas as pd
    
    s = pd.Series()
    print(s)

Describe the problem

Related code will raise an exception with that traceback:

Traceback (most recent call last):
  File "t2.py", line 5, in <module>
    print(s)
  File "C:\Users\dchigare\Desktop\REPOS\modin\modin\pandas\base.py", line 3471, in __str__
    return repr(self)
  File "C:\Users\dchigare\Desktop\REPOS\modin\modin\pandas\series.py", line 298, in __repr__
    temp_df = temp_df.iloc[:, 0]
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pandas\core\indexing.py", line 1762, in __getitem__
    return self._getitem_tuple(key)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pandas\core\indexing.py", line 2067, in _getitem_tuple
    self._has_valid_tuple(tup)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pandas\core\indexing.py", line 703, in _has_valid_tuple
    self._validate_key(k, i)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pandas\core\indexing.py", line 1994, in _validate_key
    self._validate_integer(key, axis)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pandas\core\indexing.py", line 2063, in _validate_integer
    raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
@itamarst
Copy link
Contributor

Will try to fix this.

@itamarst
Copy link
Contributor

This was not caught because the test_data data for parameterized tests doesn't include an empty value.

itamarst added a commit to itamarst/modin that referenced this issue Jul 29, 2020
Signed-off-by: Itamar Turner-Trauring <itamar@itamarst.org>
itamarst added a commit to itamarst/modin that referenced this issue Jul 30, 2020
Signed-off-by: Itamar Turner-Trauring <itamar@itamarst.org>
anmyachev pushed a commit that referenced this issue Jul 31, 2020
Signed-off-by: Itamar Turner-Trauring <itamar@itamarst.org>
aregm pushed a commit to aregm/modin that referenced this issue Sep 16, 2020
…t#1859)

Signed-off-by: Itamar Turner-Trauring <itamar@itamarst.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants