Closed JovanVeljanoski closed 1 year ago
Yeah, if think we can simply do, if len(df) == 0: return df.copy()
what do you think about that solution?
This solution can accidentally do more .
yeah sounds good, i just didn't want to check length each time without needing to.. but if you think that is not too muc overhead (for heavily filtered dfs) I am happy, and the code will be cleaner
It might trigger a compute if the filter is not yet computed, but that will happen anyway for the sort.
Addresses https://github.com/vaexio/vaex/issues/2287
@maartenbreddels I wrapped this up in
try/expect
block as to now check for length every time a df is sorted. If you think this should be done the other way around (i.e. first check length) then try to sort, lemme know!Thanks to @NickCrews for bringing this up.