You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q1: For a multi-index dataframe, what is the difference between sortlevel() and sort_index()?
As far as I can tell, for a dataframe like:
df = pd.DataFrame({'A' : [np.random.random_integers(10) for x in xrange(500)],
'B' : [np.random.random_integers(10) for x in xrange(500)],
'C' : [np.random.random_integers(10) for x in xrange(500)],
'data' : randn(500) })
the result is the same.
Q2: Why do these methods not use the same naming convention? sort_index uses underscore to separate words, while sortlevel is just one word.
Q1: For a multi-index dataframe, what is the difference between
sortlevel()
andsort_index()
?As far as I can tell, for a dataframe like:
the result is the same.
Q2: Why do these methods not use the same naming convention?
sort_index
uses underscore to separate words, whilesortlevel
is just one word.What is the official convention in Pandas? Isn't the Python convention to use underscore splitting?
The text was updated successfully, but these errors were encountered: