① Python中的Sort
Python中的内建排序函数有 sort()和sorted()两个
list.sort(func=None, key=None, reverse=False(or True))
e.g.
>>> list = [2,8,4,6,9,1,3]
>>> list.sort()
>>> list[1, 2, 3, 4, 6, 8, 9]e.g.
>>> list = [2,8,4,1,5,7,3]
>>> other = sorted(list)
>>> other[1, 2, 3, 4, 5, 7, 8]sort()方法仅定义在list中,而sorted()方法对所有的可迭代序列都有效
sorted()不会改变原来的list,而是会返回一个新的已经排序好的list
②dataframe 访问元素
贴一篇写的很好的博客:https://blog.csdn.net/wr339988/article/details/65446138/
原文:https://www.cnblogs.com/LOW-ctfer/p/10609767.html