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

Datahub python interpreter has problems displaying Pandas dataframes #5581

Open
jdmarshl opened this issue Mar 3, 2024 · 4 comments
Open
Assignees
Labels

Comments

@jdmarshl
Copy link

jdmarshl commented Mar 3, 2024

Bug description

My students I and encountered this problem starting last week. When you call a dataframe, either by name or using df.head(), there is an error message that indicates an indexing problem. Does not happen locally. I am attaching a pdf that shows the output. It seems to do it whenever we call a df object.
14_MoreClassifiers_solutions.pdf

Environment & setup

  • Hub: Datahub
  • Language: Python

How to reproduce

create a Pandas dataframe
call the dataframe, either by itself or using .head()
interpreter displays error message saying that it has an indexing problem across the columns

@jdmarshl
Copy link
Author

jdmarshl commented Mar 3, 2024

even did it for the following code block which is there as a kind of toy example

birds = pd.DataFrame({'color':['white', 'grey', 'white'],
'quacks':['yes', 'yes', 'no'],
'type':['duck', 'duck', 'goose']})
birds

@jdmarshl
Copy link
Author

jdmarshl commented Mar 3, 2024

Further note--I restarted the kernel, and dataframes displayed as expected. The problem seems to occur when the students or I have been working for awhile in a notebook and then try to display a dataframe. I cannot explain the difference in behavior when I restart the kernel. I will tell students to do that for now.

@shaneknapp
Copy link
Contributor

hey @jdmarshl ! i tried to replicate this earlier today, but was unable to. if this happens again, could you let us know here immediately.

The problem seems to occur when the students or I have been working for awhile in a notebook and then try to display a dataframe. I cannot explain the difference in behavior when I restart the kernel.

yeah, this is really strange and i'm at a loss to explain it.

@jdmarshl
Copy link
Author

jdmarshl commented Mar 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants