Create a new view of the Series.
Deprecated since version 2.2.0: Series.view
is deprecated and will be removed in a future version. Use Series.astype()
as an alternative to change the dtype.
This function will return 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.
Data type object or one of their string representations.
A new Series object as a view of the same data in memory.
See also
numpy.ndarray.view
Equivalent numpy function to create a new view of the same data in memory.
Notes
Series are instantiated with dtype=float64
by default. While numpy.ndarray.view()
will return a view with the same data type as the original array, Series.view()
(without specified dtype) will try using float64
and may fail if the original data type size in bytes is not the same.
Examples
Use astype
to change the dtype instead.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4