DataFrames.jl icon indicating copy to clipboard operation
DataFrames.jl copied to clipboard

Add reverse and reverse! functions similar to sort and sort!

Open ppalmes opened this issue 4 years ago • 2 comments

  • there are cases where you just want to reverse the order of dataframe and currently there is no implementation of the reverse() function

ppalmes avatar Sep 18 '20 10:09 ppalmes

I'm trying to implement this. I wrote a function named reverse and put that in src/abstractdataframe/reverse.jl. But when I try to use my function, it didn't get recognized. But I placed the same function in sort.jl and it worked only that the docstrings I wrote weren't recognized (And they didn't show up during ?reverse). Is there somekind of procedure to create new functions in a module?

Chandu-4444 avatar Nov 23 '21 12:11 Chandu-4444

I'm trying to implement this. I wrote a function named reverse and put that in src/abstractdataframe/reverse.jl. But when I try to use my function, it didn't get recognized. But I placed the same function in sort.jl and it worked only that the docstrings I wrote weren't recognized (And they didn't show up during ?reverse). Is there somekind of procedure to create new functions in a module?

I figured out that I need to add the new files that hold usable functions in ModuleName.jl file. This works fine, and now my function is working. But I didn't understand why my docstrings aren't getting shown when I use ?reverse.

Edit: I figured it out! Made a prototype PR #2944

Chandu-4444 avatar Nov 23 '21 13:11 Chandu-4444

added in 1.4 release

bkamins avatar Dec 04 '22 14:12 bkamins