.sort()
sorts in-place.
That means that after you call .sort()
, your existing array has been sorted. It doesn't return anything.
To take an example from "core" Python:
In [175]: L = [2, 3, 1, 5]
In [176]: L.sort()
In [177]: print(L)
[1, 2, 3, 5]
It's the same for Pandas, as documented by Pandas.sort:
Sort values and index labels by value, in place. For compatibility with ndarray API. No return value
See also: What's the difference between Series.sort() and Series.order()?