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

dataframe repr broken if unlimited pandas printing is enabled #1774

Closed
orenmazor opened this issue Jul 23, 2020 · 3 comments · Fixed by #1799
Closed

dataframe repr broken if unlimited pandas printing is enabled #1774

orenmazor opened this issue Jul 23, 2020 · 3 comments · Fixed by #1799
Assignees
Labels
bug 🦗 Something isn't working
Milestone

Comments

@orenmazor
Copy link

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Docker container: python:3.8.3-slim, uname output: Linux bf69e4362f35 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 GNU/Linux
  • Modin version (modin.__version__): initially encountered on 0.7.4, but confirmed on current SHA 37b7d2c4c5b3ac04408f362b3989de30dd3df1a2
  • Python version: 3.8.3
  • Code we can use to reproduce: see in source code

Describe the problem

I'm only just starting to switch from pandas to modin, so this could be an obvious case. but in case it's not, I figured I'd report this.

if you set_option on max_rows/max_columns to None (unlimited), you encounter a few issues. I think in my case they all stem from this snippet here.

Source code / logs

Python 3.8.3 (default, Jun  9 2020, 17:49:41) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import modin.pandas as pandas
>>> pandas.DataFrame()
UserWarning: Distributing <class 'NoneType'> object. This may take some time.
Empty DataFrame
Columns: []
Index: []
>>> pandas.set_option("display.max_rows", None)
>>> pandas.DataFrame()
UserWarning: Distributing <class 'NoneType'> object. This may take some time.
Empty DataFrame
Columns: []
Index: []
>>> pandas.set_option("display.max_columns", None)
>>> pandas.DataFrame()
UserWarning: Distributing <class 'NoneType'> object. This may take some time.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.cache/pypoetry/virtualenvs/onepassword-etl-NcjVOHQt-py3.8/src/modin/modin/pandas/dataframe.py", line 151, in __repr__
    col_counter += len(str(self.columns[i])) + 1
  File "/root/.cache/pypoetry/virtualenvs/onepassword-etl-NcjVOHQt-py3.8/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3930, in __getitem__
    return getitem(key)
IndexError: index 0 is out of bounds for axis 0 with size 0
>>> ```
@orenmazor orenmazor added the bug 🦗 Something isn't working label Jul 23, 2020
@devin-petersohn
Copy link
Collaborator

Hi @orenmazor thanks for reporting this!

I'll flag the fix for the next release, but it is happening within the next week so it may fall to the release after that. Thanks again for reporting!

@devin-petersohn devin-petersohn added this to the 0.8.0 milestone Jul 23, 2020
@devin-petersohn devin-petersohn self-assigned this Jul 24, 2020
@devin-petersohn
Copy link
Collaborator

This turned out to be a one line fix 🎉 .

devin-petersohn added a commit to devin-petersohn/modin that referenced this issue Jul 24, 2020
…aframes

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
@orenmazor
Copy link
Author

clapping

aregm pushed a commit that referenced this issue Jul 24, 2020
Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
aregm pushed a commit to aregm/modin that referenced this issue Sep 16, 2020
…aframes (modin-project#1799)

Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
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.

2 participants