为什么pandas比 sort_values().head()
更快?
- x axis: k (k in top-k)
- y axis: time consumed (Unit: Seconds)
- red point: sort_values(kind="heapsort")
- greend point: sort_values(kind="mergesort")
- blue point: nsmallest()
pandas如何实施nsmallest
?