Home >Backend Development >Python Tutorial >How to sort a series in Python
SERIES is a special function used to define chart series, it can only be used in such an environment.
#series (function curve) In all chart types except bubble charts, the SERIES function has the parameters listed in the following table. (Recommended learning: Python video tutorial)
In the bubble chart, the SERIES function also uses an additional parameter to specify the size of the bubble.
Linear data structure, series is a one-dimensional array
Pandas will silently use 0 to n-1 as the index of the series, but you can also specify the index yourself (index can be understood as key in dict)
Sort Series
It is divided into index sorting and value sorting
sort_index method
seriesdata.sort_index() seriesdata.sort_index(ascending = False, inpalce = False)
sort_values method
seriesdata.sort_values() seriesdata.sort_values(ascending = False, inpalce = False)
For more Python related technical articles, please visit the Python Tutorial column to learn!
The above is the detailed content of How to sort a series in Python. For more information, please follow other related articles on the PHP Chinese website!