Numpy dtype objects not displaying correctly?

Hello, I am currently following a tutorial (Corey Schafer on YT) to learn the python pandas framework. I’m having an issue where my notebook cell outputs do not return user friendly data for certain numerical data. Its my understanding the pandas uses numpy internally, and that ints, floats, and booleans are returned as numpy dtype objects. for example, accessing a data cell in pandas (not a jupyter cell) with the value of 1.0 would return a numpy object “np.float64(1.0)”. I was under the impression that jupyter would automatically display these numpy objects in a user friendly way in jupyter output cells, ie just the data, but i am consistently getting either “np.int64(1)”, “np.float64(1.0)”, or “np.True_/np.False_” for booleans. This behaviour is not occuring in the instructors tutorial videos, and I seem to recall that it was not behaving this way on my machine when I began the tutorial. I do not recall making any settings changes in jupyter lab or anything that would have initiated this change, though it is possible I may have simply not understood the type of data i was working with in the earlier parts of the tutorial. Strings are of course unaffected, and its possible that I was just looking at string data. I did not notice it until later on when I ran the .median() method on a pandas.Series object. All values in the Series being numpy floats, the returned median was a np.float64 object, and displayed with explicit typing. if I call the .item() method on these objects, the expected value is returned without any explicit typing, just the data in the return cell. This feels like a work around though and does not explain why this is occuring in the first place, which is driving me nuts.

Am I mistaken in thinking jupyter automatically displays numpy dtypes as just the data? I cannot seem to find anything about this anywhere on the internet. If anyone here knows anything about this I would really appreciate any info.

We’d need code and specific versions involved to say much definitive here. For example, if you had noted versions you were working with at the outset vs. now you’d might already have yourself a lead.
Details like are you working with environments and have you activated vs. not activated.

You should restart the kernel regularly if you aren’t doing that.
Run tests in a separate notebook to troubleshoot more. Better yet run tests, in sessions/environments separate from yours with newer versions vs. old. I have a repo here that launches a fairly current set of packages with JupyterLab with older Python. Click on ‘launch binder’ badge there. Using here to launch, you’ll get a temporary session with Python 3.11 and you probably need to run %pip install pandas in a cell to install Pandas. Your tests may help you narrow down things to better find what is going on, if anything. The good thing is if you mess up the environment in the session it doesn’t impact your own machine. You just close the browser window.
Be sure to check dtypes with df.dtypes.
If things have truly changed then you may have learned why you want to look into working with project management software so that things like this don’t happen to you in the middle of important efforts.

Videos can be an issue in that they cannot be updated with current handling and tech as it comes along. And so they quickly become outdated. You’ll need to adjust your expectations accordingly.