Converting Series to a Numpy array
Start your free 7-days trial now!
To convert a
Series to a Numpy array, use
to_numpy(~) like so:
The returned Numpy array uses the same memory block as the original Series. This means that modifying this Numpy array will end up mutating the original Series, and vice versa.
To create a Numpy array that is independent of the original Series, set
copy=True as a parameter: