-1

Since today I have a problem with dataframe slicing with python (3.8.):

I use a large dataframe df (shape 25000, 1500)

When I used pandas series slicing ( df["No"] ) I got

No
null null
null null
null null
null null

when I use dataframe slicing ( df[["No"]] ) I got correctly

No
0 C_1
1 C_2
2 C_3
3 C_4

Does anybody know what happened (e.g., what may have changed)?

Juergen D
  • 29
  • 1
  • What do you get when you put `df.No`? –  Oct 17 '22 at 14:22
  • Refrain from showing your dataframe as an image. Your question needs a minimal reproducible example consisting of sample input, expected output, actual output, and only the relevant code necessary to reproduce the problem. See [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) for best practices related to Pandas questions. – itprorh66 Oct 17 '22 at 17:56

1 Answers1

1

Thank you for the response! No, the error was the same, however now "" is displayed instead of "null". The same error was shown in large numpy arrays (50000, 1500). I tried the identical code (python 3.8.13) in VS Code (1.72.2) and in contrast to Pycharm (PyCharm 2022.2.3 (Professional Edition)) the CORRECT values were displayed.

When Pycharm was closed and restarted however, in the old output the CORRECT values were displayed.

After posting my questions I found the same effects described on a JetBrains webside confirming my observations ("Some wierd display in pandas series/dataframe display. not hapenning in regular jupyter", https://youtrack.jetbrains.com/issue/PY-55650/Some-wierd-Errordisplay-in-pandas-seriesdataframe-display-not-hapenning-in-regular-jupyter). Unfortunately, no solution was offered.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 20 '22 at 23:42