Pandas Series: view() function

Create a new view of Pandas Series

The view() function is used to create a new view of the Series.

This function returns a new Series with a view of the same underlying values in memory, optionally reinterpreted with a new data type. The new data type must preserve the same size in bytes as to not cause index misalignment.


Series.view(self, dtype=None)
Pandas Series view image
Name Description Type/Default Value Required / Optional
dtype   Data type object or one of their string representations. data type Required

Returns: Series - A new Series object as a view of the same data in memory.


Download the above Notebook from here.

Previous: Squeeze 1 dimensional axis objects into scalars
Next: Concatenate two or more Pandas series