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
I'm trying to create a new variable with the Summarise function and arrange according to it afterwards, but although the result is correct and no warnings or errors pop up, the output isn't arranged by my new variable.
Thank you very much
The text was updated successfully, but these errors were encountered:
I had the same problem. Not yet sure why but the following fixed it for me. I think the dataframe is not correctly formatted.
test = diamonds >> \
group_by(X.cut) >> \
summarise(dis=n_distinct(X.price))
test = pd.DataFrame(test) >> arrange(X.dis,ascending=False))
Watch out if you use count as variable as that was also causing me a headache. Count is a special function so X.count doesn't refer to the column name.
Hello,
I'm running the following code:
I'm trying to create a new variable with the Summarise function and arrange according to it afterwards, but although the result is correct and no warnings or errors pop up, the output isn't arranged by my new variable.
Thank you very much
The text was updated successfully, but these errors were encountered: