Skip to content

Commit

Permalink
Fix dataframe sorting introduced by DataFrames.jl 0.11.6
Browse files Browse the repository at this point in the history
  • Loading branch information
cstjean committed Apr 23, 2018
1 parent cfe8f7d commit ea4b41c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Manual.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"(<i>REPL note</i>: if the output of `flat` gets [split up](https://github.com/JuliaData/DataFrames.jl/issues/1272), try `Matrix(flat(pd))`)\n",
"(<i>REPL note</i>: if the output of `flat` is [incomplete](https://github.com/JuliaData/DataFrames.jl/issues/1272), try `showall(flat(pd))` or `Matrix(flat(pd))`)\n",
"\n",
"The first column shows what fraction of backtraces (in %) go through the `method at file:line_number` in the `stackframe` column. It's the same quantity as in `Base.Profile.print()`, except for recursive calls: if `factorial(2)` calls `factorial(1)`, that's 2 counts in Base's report, but only 1 count in FProfile.\n",
"\n",
Expand Down Expand Up @@ -311,7 +311,7 @@
"Other useful dataframe commands:\n",
"\n",
"```julia\n",
"sort(df, cols=:self_pct, rev=true) # sort by self_pct\n",
"sort(df, :self_pct, rev=true) # sort by self_pct\n",
"showall(df) # show the whole dataframe\n",
"```\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6
DataFrames
DataFrames 0.11.6
DataStructures
Requires
2 changes: 1 addition & 1 deletion src/FProfile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function flat(btraces::BackTraces;
# if is_applicable(f, first(keys))]...))
if _module !== nothing; df = df[[get_module(obj) in _module for obj in df[combineby]], :] end
if !inlined; df = df[!is_inlined.(df[:stackframe]), :] end
return sort(df, cols=percent ? :count_pct : :count, rev=true)
return sort(df, percent ? :count_pct : :count, rev=true)
end

flat(pd::ProfileData, _module::Tuple; kwargs...) =
Expand Down

0 comments on commit ea4b41c

Please sign in to comment.